We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
Thank you very much for the animated marker plugin for leaflet js.
I am not sure if it a bug, but the function stop() does not work for me? Do I make a mistake?
This is my code example:
` <!DOCTYPE HTML> <html lang="de"> <head> <meta charset="utf-8"/> <title>Eine OSM Karte mit Leaflet</title> <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/> <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> <script src="AnimatedMarker.js"></script> </head> <body> <button onclick="start()">Start</button> <button onclick="stop()">Stop</button> <div style="height: 700px;" id="mapid"></div> <script> var mymap = L.map('mapid', {doubleClickZoom:false}).setView([50.27264, 7.26469], 9); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(mymap); /* var line = L.polyline( [[50.68510, 7.94136],[50.68576, 6.94149],[51.68649, 6.94165]]), animatedMarker = L.animatedMarker(line.getLatLngs());*/ var line = L.polyline( [[50.68510, 7.94136],[50.68576, 6.94149],[51.68649, 6.94165]]), animatedMarker = L.animatedMarker(line.getLatLngs(), { autoStart: false, distance: 200, // meters interval: 1000, // milliseconds }); mymap.addLayer(animatedMarker); function start(){animatedMarker.start();} function stop(){animatedMarker.stop();} </script> </body> </html> `
` <!DOCTYPE HTML> <html lang="de"> <head> <meta charset="utf-8"/> <title>Eine OSM Karte mit Leaflet</title> <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/> <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> <script src="AnimatedMarker.js"></script> </head> <body> <button onclick="start()">Start</button> <button onclick="stop()">Stop</button> <div style="height: 700px;" id="mapid"></div> <script> var mymap = L.map('mapid', {doubleClickZoom:false}).setView([50.27264, 7.26469], 9);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(mymap); /* var line = L.polyline( [[50.68510, 7.94136],[50.68576, 6.94149],[51.68649, 6.94165]]), animatedMarker = L.animatedMarker(line.getLatLngs());*/
var line = L.polyline( [[50.68510, 7.94136],[50.68576, 6.94149],[51.68649, 6.94165]]), animatedMarker = L.animatedMarker(line.getLatLngs(), { autoStart: false, distance: 200, // meters interval: 1000, // milliseconds });
mymap.addLayer(animatedMarker);
function start(){animatedMarker.start();} function stop(){animatedMarker.stop();}
</script>
</body> </html> `
Thanks Astrid
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
Thank you very much for the animated marker plugin for leaflet js.
I am not sure if it a bug, but the function stop() does not work for me? Do I make a mistake?
This is my code example:
Thanks
Astrid
The text was updated successfully, but these errors were encountered: