Matt-Jensen / ember-cli-g-maps

Deprecated Google Maps Addon
http://matt-jensen.github.io/ember-cli-g-maps
MIT License
59 stars 31 forks source link

How to get and update active markers? #96

Closed sunkup closed 7 years ago

sunkup commented 7 years ago

I want to open the infoWindow for a marker on the map.

I tried getting the already set markers with this.get('map.markers'); where map is my map service. If I log this to the console i get undefined.

Matt-Jensen commented 7 years ago

I don't recommending using the map service.

See if you access the marker via g-map events otherwise if your requirements don't permit that try to render new markers on the map with:

markers: [
        {
          infoWindow: { content: '<p>They\'re Remarkable!</p>', visible: true }
        }
]
sunkup commented 7 years ago

Alright. Will do.

sunkup commented 7 years ago

I can't use events, so for the time beeing I will set all markers anew everytime I have to open a specific infoWindow.