Re: Zoom in by clicking on marker
You can display an info window on a mouseover (unsing undocumented
functionality) but it turns out to be really ugly and I advise against
it.
What happens is that if you pass the mouse over a marker near the edge
of the screen, then the API will perform an automatic pan operation so
that the whole of the info window is on screen. All the markers move
with the map, and that can cause a second marker to pass under the
mouse, possibly initiating another automatic pan, etc.
If you feel that you must try it, just use
GEvent.addListener(marker,"mouseover", function() {
marker.openInfoWindowHtml(html);
});
instead of the equivalent "click" listener
To centre and zoom when clicked, use
GEvent.addListener(marker,"click", function() {
map.centerAndZoom(marker.point, 2);
});
--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/
0 Comments:
Yorum Gönder
<< Home