Wednesday, December 27, 2006

ZMarker

My solution to 'markers too close together' is via manipulating z-index of the markers. The possibility was given to us with 2.70.

A test page with some more explanation.

Monday, December 04, 2006

Finding map buttons

The string variables listed earlier can be used to identify map buttons.
var divs = map.getContainer().getElementsByTagName("div");
for(var i = 0; i<divs.length; i++)
{
var title = divs[i].getAttribute("title");

if(title==_mZoomIn)
{
zoomInButton=divs[i];
}}
Now variable 'zoomInButton' is the container of 'Zoom In' button and you can change its style or construct an event listener.

Update 2008. Excpected lifespan of this kind of hacks is a few months. This hasn't been working for a long time. if(title=="Zoom in") works but but you have to lock the language to hl=en.