Leaflet.draw Plugin
✓ Published0🌍 Public
Dd3noob
Last edited May 8, 2020
Created on Dec 1, 2013
This example shows an interactive map of a New Zealand location using OpenStreetMap tiles, rendered with Leaflet.js and the Leaflet.draw plugin. Users can draw polygon, polyline, rectangle, circle, and marker shapes on the map, each with custom colors and style options. The drawn items are collected in a Leaflet FeatureGroup, and the code configures features like intersection detection for polygons, area display, and repeat drawing mode. A custom green leaf icon is created via `L.Icon.extend` with a shadow URL, and popup bindings are added to drawn markers.
AI-generated descriptionAn example of a map presented with leaflet.js and the Leaflet.draw plugin with a a range of options.