jekyll-leaflet-mze 0.3.24 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll-leaflet-mze/leaflet-map.js +12 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 326cfd59159172abed643c8188078b4717f73a816e8f2c1feaa4eb3769760975
|
4
|
+
data.tar.gz: 9afa5af81c852390e598459afc36561e13644273430e31fcf5822394fb204ec0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fee08768edadf0a21238c2ed0eaad1e6918c7673b7579975a21ab0e6bb78eb699df4aae739410e7d1f8485975e0566f1e0db483ba790acc65bfe776d460fbb13
|
7
|
+
data.tar.gz: 23ce0044ab1eb74c2c461431b1d5478b1c67ba6eb97e246ef6bfe61c02a881f3052d8388c020b77460025be373575379981934dccc408ff5d9be7ffcf735cfa9
|
@@ -1,7 +1,7 @@
|
|
1
1
|
(() => {
|
2
|
-
// Specify configuration variables, setup any elements and styling
|
2
|
+
// Specify configuration variables, setup any elements and styling
|
3
3
|
var leafletCdn = "https://unpkg.com/leaflet@1.9.4/dist/";
|
4
|
-
var leafletSearchCdn = "https://unpkg.com/
|
4
|
+
var leafletSearchCdn = "https://unpkg.com/leaflet-search@3.0.2/dist/";
|
5
5
|
var esriLeafletCdn = "https://unpkg.com/esri-leaflet/dist/";
|
6
6
|
|
7
7
|
// Get tag input arguments & inside block object list
|
@@ -23,10 +23,11 @@
|
|
23
23
|
var newWindowImgSrcBase64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH4wUVFzAHq2j99AAAAV9JREFUSMdjYKAxYCRHk5ubG9+1a9fm/v//H6cadnb2G/fu3atlIceC379/c3z9+jUEn5q/f/8eYWBgYECxQE5OroqA2Y8ePXq0hJWV9Qc3N/caZB8wMjJKff361QpvEAkKCv4nYMGh9+/f26MLamhoyLx9+3b/nz9/VJCC6MiLFy9sWXCE3xlGRsZvWKQu4DOciYnpCzc396HPnz97weRxWRD/8OHDa4TiAt1wfn5+z79//zoxMDDALWAiN/lhM/zevXtH0NUx0dJwsiwgxXCccUCJ4dzc3DP+//+/gZ2d/duLFy9Is+Djx4+rCbn82rVrrxgYGF6RFUR8fHyZbGxsD7AZLiEhUSAiIrJSUlIyjOw4uHnz5gVHR0d1bC7/8+eP5d+/f8P+/PmjS1Ekr1ix4hcp6ploXVwPfQuwJlMmJiYBLS0tIVIMev36NRvRFnz48OHohw8fhkYQjQKCAAChiL6Pj/LM2QAAAABJRU5ErkJggg==";
|
24
24
|
var iconUrl = "/assets/images/music-map/music-icon.png"
|
25
25
|
var iconSizePixels = [48, 48]
|
26
|
-
|
27
|
-
//
|
28
|
-
//
|
29
|
-
//
|
26
|
+
|
27
|
+
// Actual mapping section; Specify a function to be called later that
|
28
|
+
// assembles the correct JS components based on what the user specified in the
|
29
|
+
// tag input arg, the block section of features, etc. Actually creates the map
|
30
|
+
// that is visible on the page
|
30
31
|
|
31
32
|
function _getCenter(){
|
32
33
|
var defaultCenter = [0,0];
|
@@ -82,13 +83,13 @@
|
|
82
83
|
potentialPopup += '<a href="' + m.href + '">' +
|
83
84
|
'<img src="' + newWindowImgSrcBase64 + '"></img></a>';}
|
84
85
|
if(potentialPopup){
|
85
|
-
|
86
|
+
marker.bindPopup(potentialPopup);}
|
86
87
|
if(!('center' in tagInputArg)){
|
87
88
|
// If the user didn't specify a center, infer from marker
|
88
89
|
map.panTo(new L.LatLng(m.latitude, m.longitude));
|
89
90
|
}
|
90
91
|
if('city' in m) {
|
91
|
-
|
92
|
+
marker.bindTooltip(m.city + ' (' + m.popupContent.length + ')', {
|
92
93
|
permanent: true,
|
93
94
|
direction: 'bottom',
|
94
95
|
opacity: '0.95'
|
@@ -164,7 +165,7 @@
|
|
164
165
|
}
|
165
166
|
}
|
166
167
|
|
167
|
-
//The actual section that is called that creates a map
|
168
|
+
//The actual section that is called that creates a map
|
168
169
|
function createMap(){
|
169
170
|
console.log("Creating map %{id} with these args:");
|
170
171
|
console.log(tagInputArg);
|
@@ -199,8 +200,8 @@
|
|
199
200
|
}
|
200
201
|
}
|
201
202
|
|
202
|
-
// Load the correct JS libraries/CSS by adding to head:
|
203
|
-
// When ready, call createMap() to create the map on the page
|
203
|
+
// Load the correct JS libraries/CSS by adding to head:
|
204
|
+
// When ready, call createMap() to create the map on the page
|
204
205
|
|
205
206
|
function _createMap(){
|
206
207
|
// helper function to draw the map only when everything is loaded,
|