I have a manually drawn .svg file (not from Dynmap) with a lot of markers (road names, etc.), and I want to use it as a leaflet.js overlay with these code:
var svgElement = document.getElementById('svg');
var latLngBounds = L.latLngBounds([[-7200,-2560], [2336,2560]]);
map.fitBounds(latLngBounds);
var svgOverlay = L.svgOverlay(svgElement, latLngBounds, {
opacity: 1.0,
interactive: false
}).addTo(map);
Where should I put these code to make it work?
Thanks!
I have a manually drawn
.svg
file (not from Dynmap) with a lot of markers (road names, etc.), and I want to use it as aleaflet.js
overlay with these code:Where should I put these code to make it work? Thanks!