September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Change GMap2 cursor after initialization

On GMap2 seem map.getDragObject().setDraggableCursor(”crosshair”);  not work on firefox

solution is here:

http://www.teohuiming.name/toydimap/sandbox/change-map-cursor.html

Add, remove event in Google map

// add

var map = new GMap2(document.getElementById(”map”));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
GEvent.addListener(map, “click”, function() {
alert(”You clicked the map.”);
});

// remove

function MyApplication() {
this.counter = 0;
this.map = new GMap2(document.getElementById(”map”));
this.map.setCenter(new GLatLng(37.4419, -122.1419), 13);
var myEventListener = GEvent.bind(this.map, “click”, this, function(overlay, latlng) {
if (this.counter == 0) {
[...]