Closed excid3 closed 10 years ago
what about:
showInfowindow : () ->
(@_openInfowindow())()
Yes if that works! (I'm not great at javascript yet). Just mainly wanted a simpler way to find and show the infowindow from javascript.
I'm revisiting this pretty late, but I can confirm that your code does work for me. (and it's a lot simpler :smile:)
I can submit a pull request for this on just Google Maps, but I'm not familiar with how to do this on OpenLayers or Bing maps since I've never used them. I imagine it'd be useful to have on each, so do you know which docs to point me to and I'll see about adding this for the other providers?
I wanted to propose adding a method like this to the Marker classes:
We've got this method:
Which is very similar and wondered what your thoughts were on adding something like this. It makes it really easy for me to add a "View on Map" link that I can use a data attribute to quickly find the marker and show the infowindow like so:
Figured this might be useful, but wanted to get some feedback before I submitted a pull request.