Repository navigation
New module: map.js
map.js (new) - a slippy map written from scratch, with no Leaflet.
- Raster tile basemap (OpenStreetMap by default, any
{z}/{x}/{y}URL, or none) with GeoJSON drawn as SVG on top. createMap/removeMap,addGeoJSON(style and popup options, returnsremove()) /clearMap,fitMap/setMapView/getMapView,onMapClick(position and the clicked feature),showPopup/closePopup.- Drag, wheel and trackpad zoom, pinch, double click, zoom buttons and keyboard. Tiles of the previous zoom level stay, scaled, until the new ones load.
- All positions are
[longitude, latitude], the same order as GeoJSON. Popup text is inserted as text, never HTML. - Injects its own stylesheet and re-exports
geo.js, so a map page needs a single import.