Skip to content

Commit

Permalink
pin leafmap version
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jul 3, 2024
1 parent 1109831 commit fce3d8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions demos/guam.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

// ...
(() => {
var data = {"mapOptions": {"bearing": 30, "center": [144.716726, 13.37093], "pitch": 60, "style": {"version": 8, "sources": {"satellite": {"type": "raster", "tiles": ["https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=zHkOvEKXRU94s1PSxs7w"], "tileSize": 256, "attribution": "&copy; MapTiler", "maxzoom": 19}, "terrainSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}, "hillshadeSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}}, "layers": [{"id": "satellite", "type": "raster", "source": "satellite"}, {"id": "hills", "type": "hillshade", "source": "hillshadeSource", "layout": {"visibility": "visible"}, "paint": {"hillshade-shadow-color": "#473B24"}}], "terrain": {"source": "terrainSource", "exaggeration": 1.0}}, "zoom": 10.5, "height": "600px"}, "calls": [["addControl", ["NavigationControl", {"showCompass": true, "showZoom": true, "visualizePitch": false}, "top-right"]], ["addControl", ["FullscreenControl", {}, "top-right"]], ["addControl", ["ScaleControl", {"unit": "metric"}, "bottom-left"]], ["addLayer", [{"id": "ESA/WorldCover/v200", "type": "raster", "source": {"attribution": "Google Earth Engine", "tileSize": 256, "tiles": ["https://earthengine.googleapis.com/v1/projects/earthengine-legacy/maps/45126b69c28e502ee06aef6ec5300b59-f19765c98e4634bb775d13ac59e60075/tiles/{z}/{x}/{y}"], "type": "raster"}}, null]], ["setLayoutProperty", ["ESA/WorldCover/v200", "visibility", "visible"]], ["setPaintProperty", ["ESA/WorldCover/v200", "raster-opacity", 0.5]], ["addControl", ["InfoBoxControl", {"content": "<html>\n<body>\n <div class='my-legend'>\n <div class='legend-title'>ESA Landcover</div>\n <div class='legend-scale'>\n <ul class='legend-labels'>\n <li><span style='background:#006400;'></span>10 Trees</li>\n <li><span style='background:#ffbb22;'></span>20 Shrubland</li>\n <li><span style='background:#ffff4c;'></span>30 Grassland</li>\n <li><span style='background:#f096ff;'></span>40 Cropland</li>\n <li><span style='background:#fa0000;'></span>50 Built-up</li>\n <li><span style='background:#b4b4b4;'></span>60 Barren / sparse vegetation</li>\n <li><span style='background:#f0f0f0;'></span>70 Snow and ice</li>\n <li><span style='background:#0064c8;'></span>80 Open water</li>\n <li><span style='background:#0096a0;'></span>90 Herbaceous wetland</li>\n <li><span style='background:#00cf75;'></span>95 Mangroves</li>\n <li><span style='background:#fae6a0;'></span>100 Moss and lichen</li>\n </ul>\n </div>\n </div>\n\n <style type='text/css'>\n .my-legend .legend-title {\n text-align: left;\n margin-bottom: 2px;\n margin-left: 2px;\n font-weight: bold;\n font-size: 90%;\n }\n .my-legend .legend-scale ul {\n margin: 0;\n margin-bottom: 5px;\n padding: 0;\n float: left;\n list-style: none;\n }\n .my-legend .legend-scale ul li {\n font-size: 80%;\n list-style: none;\n margin-left: 1px;\n line-height: 18px;\n margin-bottom: 2px;\n }\n .my-legend ul.legend-labels li span {\n display: block;\n float: left;\n height: 16px;\n width: 30px;\n margin-right: 5px;\n margin-left: 2px;\n border: 1px solid #999;\n }\n .my-legend .legend-source {\n font-size: 70%;\n color: #999;\n clear: both;\n }\n .my-legend a {\n color: #777;\n }\n </style>\n</body>\n</html>\n", "cssText": "font-size: 15px; color: black;\n font-weight: normal; padding: 5px;\n background-color: white; border-radius: 5px;"}, "bottom-right"]], ["addControl", ["LayerSwitcherControl", {"layerIds": ["ESA/WorldCover/v200"], "theme": "default", "cssText": "padding: 5px; border: 1px solid darkgrey; border-radius: 4px;"}, "top-left"]], ["addSource", ["openmaptiles", {"url": "https://api.maptiler.com/tiles/v3/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "type": "vector"}]], ["addLayer", [{"id": "3d-buildings", "type": "fill-extrusion", "minzoom": 15, "paint": {"fill-extrusion-color": ["interpolate", ["linear"], ["get", "render_height"], 0, "lightgray", 10, "royalblue", 20, "lightblue"], "fill-extrusion-height": ["interpolate", ["linear"], ["zoom"], 15, 0, 16, ["get", "render_height"]], "fill-extrusion-base": ["case", [">=", ["get", "zoom"], 16], ["get", "render_min_height"], 0]}, "source": "openmaptiles", "source-layer": "building"}, null]]]};
var data = {"mapOptions": {"bearing": 30, "center": [144.716726, 13.37093], "pitch": 60, "style": {"version": 8, "sources": {"satellite": {"type": "raster", "tiles": ["https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=zHkOvEKXRU94s1PSxs7w"], "tileSize": 256, "attribution": "&copy; MapTiler", "maxzoom": 19}, "terrainSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}, "hillshadeSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}}, "layers": [{"id": "satellite", "type": "raster", "source": "satellite"}, {"id": "hills", "type": "hillshade", "source": "hillshadeSource", "layout": {"visibility": "visible"}, "paint": {"hillshade-shadow-color": "#473B24"}}], "terrain": {"source": "terrainSource", "exaggeration": 1.0}}, "zoom": 10.5, "height": "600px"}, "calls": [["addControl", ["NavigationControl", {"showCompass": true, "showZoom": true, "visualizePitch": false}, "top-right"]], ["addControl", ["FullscreenControl", {}, "top-right"]], ["addControl", ["ScaleControl", {"unit": "metric"}, "bottom-left"]], ["addLayer", [{"id": "ESA/WorldCover/v200", "type": "raster", "source": {"attribution": "Google Earth Engine", "tileSize": 256, "tiles": ["https://earthengine.googleapis.com/v1/projects/earthengine-legacy/maps/45126b69c28e502ee06aef6ec5300b59-7f582e0b18f656145f8efb4e3722e558/tiles/{z}/{x}/{y}"], "type": "raster"}}, null]], ["setLayoutProperty", ["ESA/WorldCover/v200", "visibility", "visible"]], ["setPaintProperty", ["ESA/WorldCover/v200", "raster-opacity", 0.5]], ["addControl", ["InfoBoxControl", {"content": "<html>\n<body>\n <div class='my-legend'>\n <div class='legend-title'>ESA Landcover</div>\n <div class='legend-scale'>\n <ul class='legend-labels'>\n <li><span style='background:#006400;'></span>10 Trees</li>\n <li><span style='background:#ffbb22;'></span>20 Shrubland</li>\n <li><span style='background:#ffff4c;'></span>30 Grassland</li>\n <li><span style='background:#f096ff;'></span>40 Cropland</li>\n <li><span style='background:#fa0000;'></span>50 Built-up</li>\n <li><span style='background:#b4b4b4;'></span>60 Barren / sparse vegetation</li>\n <li><span style='background:#f0f0f0;'></span>70 Snow and ice</li>\n <li><span style='background:#0064c8;'></span>80 Open water</li>\n <li><span style='background:#0096a0;'></span>90 Herbaceous wetland</li>\n <li><span style='background:#00cf75;'></span>95 Mangroves</li>\n <li><span style='background:#fae6a0;'></span>100 Moss and lichen</li>\n </ul>\n </div>\n </div>\n\n <style type='text/css'>\n .my-legend .legend-title {\n text-align: left;\n margin-bottom: 2px;\n margin-left: 2px;\n font-weight: bold;\n font-size: 90%;\n }\n .my-legend .legend-scale ul {\n margin: 0;\n margin-bottom: 5px;\n padding: 0;\n float: left;\n list-style: none;\n }\n .my-legend .legend-scale ul li {\n font-size: 80%;\n list-style: none;\n margin-left: 1px;\n line-height: 18px;\n margin-bottom: 2px;\n }\n .my-legend ul.legend-labels li span {\n display: block;\n float: left;\n height: 16px;\n width: 30px;\n margin-right: 5px;\n margin-left: 2px;\n border: 1px solid #999;\n }\n .my-legend .legend-source {\n font-size: 70%;\n color: #999;\n clear: both;\n }\n .my-legend a {\n color: #777;\n }\n </style>\n</body>\n</html>\n", "cssText": "font-size: 15px; color: black;\n font-weight: normal; padding: 5px;\n background-color: white; border-radius: 5px;"}, "bottom-right"]], ["addControl", ["LayerSwitcherControl", {"layerIds": ["ESA/WorldCover/v200"], "theme": "default", "cssText": "padding: 5px; border: 1px solid darkgrey; border-radius: 4px;"}, "top-left"]], ["addSource", ["openmaptiles", {"url": "https://api.maptiler.com/tiles/v3/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "type": "vector"}]], ["addLayer", [{"id": "3d-buildings", "type": "fill-extrusion", "minzoom": 15, "paint": {"fill-extrusion-color": ["interpolate", ["linear"], ["get", "render_height"], 0, "lightgray", 10, "royalblue", 20, "lightblue"], "fill-extrusion-height": ["interpolate", ["linear"], ["zoom"], 15, 0, 16, ["get", "render_height"]], "fill-extrusion-base": ["case", [">=", ["get", "zoom"], 16], ["get", "render_min_height"], 0]}, "source": "openmaptiles", "source-layer": "building"}, null]]]};
pymaplibregl(data);
})();
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions demos/nyc.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

// ...
(() => {
var data = {"mapOptions": {"bearing": 30, "center": [-74.012998, 40.70414], "pitch": 60, "style": {"version": 8, "sources": {"satellite": {"type": "raster", "tiles": ["https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=zHkOvEKXRU94s1PSxs7w"], "tileSize": 256, "attribution": "&copy; MapTiler", "maxzoom": 19}, "terrainSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}, "hillshadeSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}}, "layers": [{"id": "satellite", "type": "raster", "source": "satellite"}, {"id": "hills", "type": "hillshade", "source": "hillshadeSource", "layout": {"visibility": "visible"}, "paint": {"hillshade-shadow-color": "#473B24"}}], "terrain": {"source": "terrainSource", "exaggeration": 1.0}}, "zoom": 15.6, "height": "600px"}, "calls": [["addControl", ["NavigationControl", {"showCompass": true, "showZoom": true, "visualizePitch": false}, "top-right"]], ["addControl", ["FullscreenControl", {}, "top-right"]], ["addControl", ["ScaleControl", {"unit": "metric"}, "bottom-left"]], ["addLayer", [{"id": "ESA/WorldCover/v200", "type": "raster", "source": {"attribution": "Google Earth Engine", "tileSize": 256, "tiles": ["https://earthengine.googleapis.com/v1/projects/earthengine-legacy/maps/45126b69c28e502ee06aef6ec5300b59-f19765c98e4634bb775d13ac59e60075/tiles/{z}/{x}/{y}"], "type": "raster"}}, null]], ["setLayoutProperty", ["ESA/WorldCover/v200", "visibility", "visible"]], ["setPaintProperty", ["ESA/WorldCover/v200", "raster-opacity", 0.5]], ["addControl", ["InfoBoxControl", {"content": "<html>\n<body>\n <div class='my-legend'>\n <div class='legend-title'>ESA Landcover</div>\n <div class='legend-scale'>\n <ul class='legend-labels'>\n <li><span style='background:#006400;'></span>10 Trees</li>\n <li><span style='background:#ffbb22;'></span>20 Shrubland</li>\n <li><span style='background:#ffff4c;'></span>30 Grassland</li>\n <li><span style='background:#f096ff;'></span>40 Cropland</li>\n <li><span style='background:#fa0000;'></span>50 Built-up</li>\n <li><span style='background:#b4b4b4;'></span>60 Barren / sparse vegetation</li>\n <li><span style='background:#f0f0f0;'></span>70 Snow and ice</li>\n <li><span style='background:#0064c8;'></span>80 Open water</li>\n <li><span style='background:#0096a0;'></span>90 Herbaceous wetland</li>\n <li><span style='background:#00cf75;'></span>95 Mangroves</li>\n <li><span style='background:#fae6a0;'></span>100 Moss and lichen</li>\n </ul>\n </div>\n </div>\n\n <style type='text/css'>\n .my-legend .legend-title {\n text-align: left;\n margin-bottom: 2px;\n margin-left: 2px;\n font-weight: bold;\n font-size: 90%;\n }\n .my-legend .legend-scale ul {\n margin: 0;\n margin-bottom: 5px;\n padding: 0;\n float: left;\n list-style: none;\n }\n .my-legend .legend-scale ul li {\n font-size: 80%;\n list-style: none;\n margin-left: 1px;\n line-height: 18px;\n margin-bottom: 2px;\n }\n .my-legend ul.legend-labels li span {\n display: block;\n float: left;\n height: 16px;\n width: 30px;\n margin-right: 5px;\n margin-left: 2px;\n border: 1px solid #999;\n }\n .my-legend .legend-source {\n font-size: 70%;\n color: #999;\n clear: both;\n }\n .my-legend a {\n color: #777;\n }\n </style>\n</body>\n</html>\n", "cssText": "font-size: 15px; color: black;\n font-weight: normal; padding: 5px;\n background-color: white; border-radius: 5px;"}, "bottom-right"]], ["addControl", ["LayerSwitcherControl", {"layerIds": ["ESA/WorldCover/v200"], "theme": "default", "cssText": "padding: 5px; border: 1px solid darkgrey; border-radius: 4px;"}, "top-left"]], ["addSource", ["openmaptiles", {"url": "https://api.maptiler.com/tiles/v3/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "type": "vector"}]], ["addLayer", [{"id": "3d-buildings", "type": "fill-extrusion", "minzoom": 15, "paint": {"fill-extrusion-color": ["interpolate", ["linear"], ["get", "render_height"], 0, "lightgray", 200, "royalblue", 400, "lightblue"], "fill-extrusion-height": ["interpolate", ["linear"], ["zoom"], 15, 0, 16, ["get", "render_height"]], "fill-extrusion-base": ["case", [">=", ["get", "zoom"], 16], ["get", "render_min_height"], 0]}, "source": "openmaptiles", "source-layer": "building"}, null]]]};
var data = {"mapOptions": {"bearing": 30, "center": [-74.012998, 40.70414], "pitch": 60, "style": {"version": 8, "sources": {"satellite": {"type": "raster", "tiles": ["https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=zHkOvEKXRU94s1PSxs7w"], "tileSize": 256, "attribution": "&copy; MapTiler", "maxzoom": 19}, "terrainSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}, "hillshadeSource": {"type": "raster-dem", "url": "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "tileSize": 256}}, "layers": [{"id": "satellite", "type": "raster", "source": "satellite"}, {"id": "hills", "type": "hillshade", "source": "hillshadeSource", "layout": {"visibility": "visible"}, "paint": {"hillshade-shadow-color": "#473B24"}}], "terrain": {"source": "terrainSource", "exaggeration": 1.0}}, "zoom": 15.6, "height": "600px"}, "calls": [["addControl", ["NavigationControl", {"showCompass": true, "showZoom": true, "visualizePitch": false}, "top-right"]], ["addControl", ["FullscreenControl", {}, "top-right"]], ["addControl", ["ScaleControl", {"unit": "metric"}, "bottom-left"]], ["addLayer", [{"id": "ESA/WorldCover/v200", "type": "raster", "source": {"attribution": "Google Earth Engine", "tileSize": 256, "tiles": ["https://earthengine.googleapis.com/v1/projects/earthengine-legacy/maps/45126b69c28e502ee06aef6ec5300b59-7f582e0b18f656145f8efb4e3722e558/tiles/{z}/{x}/{y}"], "type": "raster"}}, null]], ["setLayoutProperty", ["ESA/WorldCover/v200", "visibility", "visible"]], ["setPaintProperty", ["ESA/WorldCover/v200", "raster-opacity", 0.5]], ["addControl", ["InfoBoxControl", {"content": "<html>\n<body>\n <div class='my-legend'>\n <div class='legend-title'>ESA Landcover</div>\n <div class='legend-scale'>\n <ul class='legend-labels'>\n <li><span style='background:#006400;'></span>10 Trees</li>\n <li><span style='background:#ffbb22;'></span>20 Shrubland</li>\n <li><span style='background:#ffff4c;'></span>30 Grassland</li>\n <li><span style='background:#f096ff;'></span>40 Cropland</li>\n <li><span style='background:#fa0000;'></span>50 Built-up</li>\n <li><span style='background:#b4b4b4;'></span>60 Barren / sparse vegetation</li>\n <li><span style='background:#f0f0f0;'></span>70 Snow and ice</li>\n <li><span style='background:#0064c8;'></span>80 Open water</li>\n <li><span style='background:#0096a0;'></span>90 Herbaceous wetland</li>\n <li><span style='background:#00cf75;'></span>95 Mangroves</li>\n <li><span style='background:#fae6a0;'></span>100 Moss and lichen</li>\n </ul>\n </div>\n </div>\n\n <style type='text/css'>\n .my-legend .legend-title {\n text-align: left;\n margin-bottom: 2px;\n margin-left: 2px;\n font-weight: bold;\n font-size: 90%;\n }\n .my-legend .legend-scale ul {\n margin: 0;\n margin-bottom: 5px;\n padding: 0;\n float: left;\n list-style: none;\n }\n .my-legend .legend-scale ul li {\n font-size: 80%;\n list-style: none;\n margin-left: 1px;\n line-height: 18px;\n margin-bottom: 2px;\n }\n .my-legend ul.legend-labels li span {\n display: block;\n float: left;\n height: 16px;\n width: 30px;\n margin-right: 5px;\n margin-left: 2px;\n border: 1px solid #999;\n }\n .my-legend .legend-source {\n font-size: 70%;\n color: #999;\n clear: both;\n }\n .my-legend a {\n color: #777;\n }\n </style>\n</body>\n</html>\n", "cssText": "font-size: 15px; color: black;\n font-weight: normal; padding: 5px;\n background-color: white; border-radius: 5px;"}, "bottom-right"]], ["addControl", ["LayerSwitcherControl", {"layerIds": ["ESA/WorldCover/v200"], "theme": "default", "cssText": "padding: 5px; border: 1px solid darkgrey; border-radius: 4px;"}, "top-left"]], ["addSource", ["openmaptiles", {"url": "https://api.maptiler.com/tiles/v3/tiles.json?key=zHkOvEKXRU94s1PSxs7w", "type": "vector"}]], ["addLayer", [{"id": "3d-buildings", "type": "fill-extrusion", "minzoom": 15, "paint": {"fill-extrusion-color": ["interpolate", ["linear"], ["get", "render_height"], 0, "lightgray", 200, "royalblue", 400, "lightblue"], "fill-extrusion-height": ["interpolate", ["linear"], ["zoom"], 15, 0, 16, ["get", "render_height"]], "fill-extrusion-base": ["case", [">=", ["get", "zoom"], 16], ["get", "render_min_height"], 0]}, "source": "openmaptiles", "source-layer": "building"}, null]]]};
pymaplibregl(data);
})();
</script>
</body>
</html>
</html>
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
jupyterlab
leafmap>=0.35.7
leafmap[maplibre]

0 comments on commit fce3d8c

Please sign in to comment.