Answer the question
In order to leave comments, you need to log in
Leaflet - how to make dynamic markers without reloading the page/map?
There is a leaflet map, for example, here is the option https://jsfiddle.net/ew1jned8/
There are markers on the map, in the example above there are 3 of them. On the site, each marker in the script is displayed via foreach from the site database, where each marker in the database has a latitude and longitude.
The bottom line is that at the moment the markers in the database are updated every 5 seconds, and on the map, respectively, they will be updated only when you reload the page.
How to update marker positions every 5 seconds without reloading the page?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question