hi ive go a small site that shows a map of the uk i have managed to show markers but having problems configuring the window that opens when clicked. cant figure out how to get a url into it. current code.... puts a moar into the map and a live window with the details " a brief encounter and LA6 2AJ" var point = new GPoint(-2.5773275,54.2217413889); var marker = createMarker(point, 'A Brief Encounter', 'LA6 2AJ'); map.addOverlay(marker); what i need is A Brief Encounter LA6 2AJ web link thanks
Use GLatLng instead of GPoint. Then use the following: function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(43.907787,-79.359741), 9); var point = new GLatLng( 43.65654,-79.90138); var marker = createMarker(point,'A Brief Encounter<br>LA6 2AJ<br><a href="http://www.somewebsite.com/">web link</a>') map.addOverlay(marker);