Closed mbajur closed 13 years ago
This functionality doesn't exist natively. If you want to open an info window with a click event on a marker, you need to use the ivory_google_map.event
service. This service allow you to generate all events you want.
In your case, the event is :
$clickEvent = $this->get('ivory_google_map.event');
$clickEvent->setInstance($marker->getJavascriptVariable());
$clickEvent->setEventName('click');
$clickEvent->setHandle(sprintf('function(){%s.open(%s, %s);}',
$infoWindow->getJavascriptVariable(),
$map->getJavascriptVariable(),
$marker->getJavascriptVariable()
);
$map->getEventManager()->addEvent($clickEvent);
Oh, great, thank you for your help! :) I thought $marker->setInfoWindow() will take care of it. Maybe it's a good idea to put above example in the doc ? It can be quite helpfull for new IvoryGoogleMap users
Hello,
What is the contest to use for'$this'? Any news about this functionality as native?
I have a problem with displaying infoWindow with markers.
Full description of my problem is posted here: http://stackoverflow.com/questions/7311629/ivorygooglemap-cant-display-infowindow
Thanks, Mike