I use this code to push from my collection the markers title, lat and lon. I am not seeing all my 55 markers appear, i get 50 and I found a post that mentions a 50 marker limit, per sec. they mention to delay the marker addition to the google api maps by a sec, to get more markers to show. What is the best approach using what i have below, I was thinking I should use a 1 sec delay timer and add the first 50 then the next 50?
function sendLocations() {
getLocations().then((Sites) => {
let markers = [];
for ( let i = 0; i < Sites.length; i++) {
let location = Sites[i];
markers.push({ title: location.title, position: { lat: location.latitude, lng: location.longitude } });
}
$w(‘#htmlMap’).postMessage({ markers });
});
}