circle with database..in google maps
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script>
<script type="text/javascript" src="../src/infobox.js"></script>
<script type="text/javascript">
var amsterdam = new google.maps.LatLng(28.5472, 77.2508);
function overload() {
var markers = JSON.parse('<%=ConvertDataTabletoString() %>');
var mapProp = {
center: amsterdam,
zoom: 7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"), mapProp);
for (i = 0; i < markers.length; i++) {
var data = markers[i];
var myLatlng = new google.maps.LatLng(data.lat, data.long);
var myCity = new google.maps.Circle({
center: myLatlng,
radius: 2,
strokeColor: "#0000FF",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#0000FF",
fillOpacity: 0.4
});
}
myCity.setMap(map);
google.maps.event.addDomListener(window, 'load', overload);
}
</script>
<title>Creating and Using an InfoBox</title>
</head>
<body onload="overload()">
<div id="map_canvas" style="width: 100%; height: 400px"></div>
<p>
its shows that it gets data from database and displays in circle...
</body>
</html>
its showing the error...
Error: Unterminated string constant
around the :
var markers = JSON.parse('<%=ConvertDataTabletoString() %>');
help