0
I need to get the data that are in json format example:
{"latitude": "-3,3462, -60,6790"}
I need to display the results time in time type every 5 seconds and move to javascript without refreshing the page.
javascript
var testMarker = L.marker([-3.3462, -60.6790],{icon: orangeIcon}).bindPopup('Kedson<br>Visto: 12:00pm');
the view you refer to is to return to a websocket, or ajax, or you are using CLI and need to keep checking a variable in some thread?
– Antonio
In javascript it looks like this: var testMarker = L.Marker([-3.3462, -60.6790],{icon: orangeIcon}). bindPopup('Kedson<br>Seen: 12:00pm');
– Hemerson Prestes
I need to change these values -3.3462, -60.6790 every 5 seconds and latitude
– Hemerson Prestes
So you have a javascript variable that needs every 5 seconds to be updated with the latest php service value, this? is using some framework in javascript or php?
– Antonio
I will put the javascript code below the question
– Hemerson Prestes
This object you placed from the coordinates, is that what it is? With the value of latitude and longitude with comma in the decimal separator and still separated by comma, all within a string? You cannot return something like PHP
{"latitude": -3.346, "longitude": -60.6790}
or{"coord": [-3.3462, -60.6790]}
?– Pagotti
{"latitude": -3.346, "longitude": -60.6790}
– Hemerson Prestes