Answer the question
In order to leave comments, you need to log in
Google Maps, working with a map on a click on a DOM element
Actually, you need to open an infowindow attached to a marker with a unique name (marker1, for example) when clicking on an element outside the map structure (say, on a link under the map). I feel that this can help me code.google.com/intl/ru-RU/apis/maps/documentation/javascript/reference.html#MapsEventListener , but without an example I can't figure out which side to approach.
Answer the question
In order to leave comments, you need to log in
In short, half a day of googling did give the only correct result.
After you've created a marker object and attached an infobox to it, you can call
$('#marker1').click(function(){ google.maps.event.trigger(marker,"click"); return false; });
So you can open your example and
see
how
it
's
done
) InfoWindow content"
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker)
});
});
I didn't understand what the problem is. You receive the click event on the link, take the infowindow object (which was created in advance and is attached to the marker) and call open on it (or how do they make it visible?)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question