@mbostock
Building a better computational medium. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.
Published (unlisted)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Changed in parent
L = { const r = require.alias({
-
leaflet: "leaflet@1.8.0/dist/leaflet-src.js", "leaflet/dist/leaflet.css": "leaflet@1.8.0/dist/leaflet.css", "leaflet-fullscreen": "leaflet-fullscreen@1.0.2/dist/Leaflet.fullscreen.min.js", "leaflet-fullscreen/dist/leaflet.fullscreen.css": "leaflet-fullscreen@1.0.2/dist/leaflet.fullscreen.css", "leaflet-timedimension": "leaflet-timedimension@1.1.1/dist/leaflet.timedimension.min.js", "leaflet-timedimension/dist/leaflet.timedimension.control.min.css": "leaflet-timedimension@1.1.1/dist/leaflet.timedimension.control.min.css",
+
"leaflet": "leaflet@1.7.1/dist/leaflet-src.js", "leaflet/dist/leaflet.css": "leaflet@1.7.1/dist/leaflet.css", "leaflet-fullscreen": "leaflet-fullscreen@1.0.2/dist/Leaflet.fullscreen.min.js", "leaflet-fullscreen/dist/leaflet.fullscreen.css": "leaflet-fullscreen@1.0.2/dist/leaflet.fullscreen.css", "leaflet-timedimension": "leaflet-timedimension@1.1.1/dist/leaflet.timedimension.min.js", "leaflet-timedimension/dist/leaflet.timedimension.control.min.css": "leaflet-timedimension@1.1.1/dist/leaflet.timedimension.control.min.css",
"iso8601-js-period": "iso8601-js-period@0.2.1/iso8601.js", "leaflet.sync": "leaflet.sync@0.2.4/L.Map.Sync.js",
-
"leaflet.control.resizer": "leaflet.control.resizer@0.0.1/L.Control.Resizer.js", "leaflet.control.resizer/L.Control.Resizer.css": "leaflet.control.resizer@0.0.1/L.Control.Resizer.css"
+
"leaflet.control.resizer": "leaflet.control.resizer@0.0.1/L.Control.Resizer.js", "leaflet.control.resizer/L.Control.Resizer.css": "leaflet.control.resizer@0.0.1/L.Control.Resizer.css"
}); const L = await r("leaflet"); await Promise.all([ r("leaflet-fullscreen").catch(() => {}), r("leaflet-timedimension").catch(() => {}), r("leaflet.sync").catch(() => {}), r("leaflet.control.resizer").catch(() => {}) ]);
-
if (!L._style) { // apply stylesheets (only once on load)
+
if (!L._style) { // apply stylesheets (only once on load)
L._style = true; document.head.append(htl.html` <link href=${await r.resolve("leaflet/dist/leaflet.css")} rel=stylesheet>
-
<link href=${await r.resolve( "leaflet-fullscreen/dist/leaflet.fullscreen.css" )} rel=stylesheet> <link href=${await r.resolve( "leaflet-timedimension/dist/leaflet.timedimension.control.min.css" )} rel=stylesheet> <link href=${await r.resolve( "leaflet.control.resizer/L.Control.Resizer.css" )} rel=stylesheet>
+
<link href=${await r.resolve("leaflet-fullscreen/dist/leaflet.fullscreen.css")} rel=stylesheet> <link href=${await r.resolve("leaflet-timedimension/dist/leaflet.timedimension.control.min.css")} rel=stylesheet> <link href=${await r.resolve("leaflet.control.resizer/L.Control.Resizer.css")} rel=stylesheet>
`); } return L; }
Insert cell