Click here to Skip to main content
15,891,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
Please can anyone tell me why this code is not running although it was running before very well.Even debugger is also showing nothing although script debugging is enabled in internet options,in left bottom of browser "done" is showing.
Please help me

XML
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps API Sample</title>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8m ADN a0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q" type="text/javascript"></script>
<script type="text/javascript">
function initialize()
{
if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map_canvas"));
var center = new GLatLng(37.7,212.2);
map.setCenter(center, 5);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
function createMarker(point)
{
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function()
{
marker.openInfoWindowHtml("Marker lattitude and longitude " + point + " karachi " );});
return marker;
}

point=new GLatLng(37.7,212.2)
map.addOverlay(createMarker(point))
}
}
</script>
</head>
<body onload="initialize()" ����load="GUnload()" style="font-family: Arial;border: 0 none;">
<div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
</html>
Posted
Updated 18-Nov-10 1:19am
v3
Comments
Dalek Dave 18-Nov-10 7:19am    
Edited for Code Block.

1 solution

if (GBrowserIsCompatible())
{


This block is not closed properly, I think you should have a closing brace before
function createMarker(point)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900