No,it doesn't work :-( This is the my map page http://meteocecchina.altervista.org/script/gmapdbv2.php
On 6 Gen, 00:41, Andrew Leach <[email protected]> wrote: > On 5 January 2012 23:24, Darko1984 <[email protected]> wrote: > > > > > GEvent.addListener(marker, 'click', function() { > > > > document.getElementById("prova").innerHTML = ""; > > }); > > > The first populate the div when i click on a marker,the second will > > empty the div but only if i click on a marker!how can i do the same > > thing by clicking anywhere on the map? > > You do it by substituting whatever variable you have used for your map: > > GEvent.addListener(map, 'click', function() { > > document.getElementById("prova").innerHTML = ""; > }); > > This listens for a click on whatever "map" represents. > > You may or may not have called your map "map". As you haven't given a > link, we can't tell. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
