Update Markers Dynamically
-
Hi!
Do you know of any possibility of updating the markers dynamically thru jquery or another method? I’ve managed to do it with one marker but it’s sometimes inconsistent. With updating multiple markers it doesn’t really work at all.
The problems seems to be re-rendering the drawn map.
My method of doing things.
jQuery(“id^=wpmapit_”).attr(“lat”, 39.21039).attr(“lng”, 21.0310).attr(“data-pins”, JSON.stringify([{lat: “”, lng: “”, marker_title: “”, …}, {pin2}, … ]))If I update the map normally ( let’s say a refresh ), or if the map renders after the changes were made to it, everything is fine. However, an update on the attributes of the map doesn’t rerender it.
The topic ‘Update Markers Dynamically’ is closed to new replies.