function createMarker(point, details, markertype) { var icon = new GIcon(); icon.image = "http://www.cityzine.be/images/mapicons/var.png"; // icon.image = "http://www.cityzine.be/images/mapicons/" + markertype + ".png"; icon.iconSize = new GSize(15,15); icon.iconAnchor = new GPoint(13, 10); icon.infoWindowAnchor = new GPoint(15, 20); var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("
" + details + "
"); }); return marker; } function loadfichemap() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); if (map) { map.addControl(new GSmallMapControl()); map.setCenter(new GLatLng(51.2116, 3.21124), 16); var point = new GLatLng(51.2116, 3.21124); var details = "Aneth"; map.addOverlay(createMarker(point, details, "")); map.checkResize(); } } }