How to search for markers already created on a map - Google Maps

5

I have a map where a number of Markers already exist. In this map I need to go get all the markers, and show a listing with the markers visible to the user, to make a small list of data similar to this example .

How can I load all markers created on the map into a javascript variable?

Ps.- I'm working on outsystems, and they do not give me the ability to install third-party APIs beyond Google Maps.

    
asked by anonymous 20.12.2016 / 13:37

1 answer

2

Try to do this:

var Bounds  = osGoogleMap.OSMaps.DublinTheme_wt106_block_wtMainContent_Google_Maps_wtMap_block.getBounds();
var Markers = [];

for(var i = 0; i < markers.length; i++){
   if(Bounds.contains(markers[i].position))
      Markers.push(markers[i].title);
}

console.log(Markers);
    
20.12.2016 / 14:10