Demonstrates how to load SVG's as Leaflet icons via the data URI method.
Following was helpful to figure this out:
- Optimizing SVGs in Data URIs
- http://codepen.io/gabrien/pen/NqGvGq
- http://codepen.io/chriscoyier/pen/ZQgvyG/
This block is a modified example taken from Working with spatial data.
Built with blockbuilder.org
forked from enjalot's block: WWSD #1: Leaflet starter
forked from enjalot's block: WWSD #1: Leaflet starter
Thanks a lot for taking the time document this gist. While dabbling around I came across another way to use inline SVG as a marker, using L.divIcon, maybe it helps someone:
L.divIcon({ html: $(marker_svg)[0].outerHTML, // svgrect iconSize: [24, 38], iconAnchor: [12, 38] })