Duplicate bookmarks in Google Maps, even with cache disabled!

0

Hello, I'm working with google maps, everything was going okay, but when I started using the bookmarks, the same ones are getting duplicated in some places, this happens when I'm walking and I'm stopped somewhere, when I move again and the GPS updates my position, where I was stopped is a marked, like a cache, but the way I'm handling the bookmarks was not for that to happen, I've already disabled the page cache and nothing, if it has already happened to someone or if anyone has any tips I will be very grateful, thanks for the attention, I'll be putting the code I used to disable the cache in the browser and how I'm updating the bookmarks on the map.

Meta tags to disable caching

Remove all bookmarks to update them, I did this to see if it stopped duplicating.

$.each(markers, function(index, marker) {
    marker.setMap(null);
});

===================================================== =======================

This variable is created at the beginning of the script

var markers = [];

Here is the content of a function that gets to get with the device information

if (markers[device.id] == undefined) {
    markers[device.id] = new google.maps.Marker({
        position: { lat: device.lat, lng: device.lng },
        map: map,
        title: device.name
    });
} else {
    markers[device.id].setPosition( { lat: device.lat, lng: device.lng } );
}
    
asked by anonymous 31.03.2016 / 16:05

0 answers