sg

Perşembe, Ocak 05, 2006

Marker and Info Window not displaying


I'm trying to place several markers with info boxes that appear when
you click on them. I was able to place a marker, but when I added the
code to have the info box pop up the marker disappeared and the info
box is no where to be seen. Help!

var map = new GMap(document.getElementById("map"));
map.addControl(new GMapTypeControl());
map.addControl(new GSmallMapControl());
map.centerAndZoom(new GPoint(-93.216565, 30.230461), 4);

function createInfoMarker(point, address) {
var marker = new GMarker(-93.219036, 30.229712);
GEvent.addListener(marker, "click",
function() {
marker.openInfoWindowHtml(address);
}
);

return marker;

}

var point = new GPoint(-93.219036, 30.229712);
address = "Civic Center Twelfth Night";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık