I had a similar problem with my googleMaps and here was my solution ...
During my call of markers, I loaded points outside the viewport. For example .... If my N-lat was 85, and my S-bit was 88, I would have typed the points between 83 and 90 latitudes.
viewportN = 85;
viewportS = 88;
searchBoundN = 83;
searchBoundS = 90;
When you click on a marker, it automatically sets you up so that your Northbound is now 84. You add an if statement to your unoccupied function, which states:
map.addListener("idle", function () {
//get map viewport bounds
.....
// check if you're in territory that doesn't have markers
if (viewPortN < searchBoundN || viewportS > searchBoundS || <<repeat for E, W>>) {
refreshMarkers();
}
});
. script .
, , . , .