Public
Edited
Nov 21, 2022
Insert cell
Insert cell
Insert cell
encoded = "qcveFtrgiV`FkPfGoTFgD_OqT"
Insert cell
decoded = polyline.decode(encoded)
Insert cell
JSON.stringify(decoded)
Insert cell
geojson = polyline.polylineToGeoJSON(encoded)
Insert cell
JSON.stringify(geojson)
Insert cell
fromGeoJson = polyline.geoJSONToPolyline(geojson)
Insert cell
encoded === fromGeoJson
Insert cell
Insert cell
polyline = require("@placemarkio/polyline")
Insert cell
L = {
const L = await require("leaflet@1.9/dist/leaflet.js");
if (!L._style) {
const href = await require.resolve("leaflet@1.9/dist/leaflet.css");
document.head.appendChild(
(L._style = html`<link href=${href} rel=stylesheet>`)
);
}
return L;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more