Skip to main content
100%

Simple Leaflet Map

✓ Published0🌍 Public
Dd3noob
Last edited Dec 6, 2019
Created on Dec 6, 2019

This map displays Wellington, New Zealand, with a set of geolocated markers for landmarks like Te Papa and the Embassy Theatre, connected by a polyline route. It uses Leaflet.js with a swappable base layer (OpenStreetMap or OpenTopoMap tile servers) and a user-controlled overlay group. The code constructs a layer group for the markers and line, then adds a leaflet control to toggle between the two tile layers and the overlay.

AI-generated description

An example of using leaflet.js with multiple tile layers and an overlay.

This graph is part of the code samples for the update to the book Leaflet Tips and Tricks to version 1 of leaflet.js.

mit Licensed

Similar vizzes