Adding markers dynamically using javascript
-
Hi friends,
I need to be able to add markers into the windy map dynamically using javascript without reloading the map.
I am using the windy APIs and leaflet in conjunction.
What I need is to be able to add a marker to the already loaded map (sort of like what you can do with the google maps APIs) without having to call the map function every time.
I have a dropdown menu that calls a javascript function that should add the new marker to the map.
I hope there is a simple way to do this. I appreciate the help
-
K Korina moved this topic from General Discussion on
-
@darl4 for now, I am temporarily creating nested arrays to feed the map function before the map is loaded, it is not the most efficient way of doing it but it is a solution. That means I need to reload the function every time I add or remove a marker. This is why I wanted to dynamically add or remove markers to the map. TY for any help!