<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
#map_canvas {display:none;}
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&key=AIzaSyAZEI_aszTGmtGUTQP-yxu2DkHRZ9yvctg">
</script>
<%-- http:
<script type="text/javascript">
var MarkerData = [{ "Name": "Penn Station", "Latitude": 40.75058, "Longitude": -73.99358, "LocationType": "Station" },
{ "Name": "Empire State Building", "Latitude": 40.748039, "Longitude": -73.985753, "LocationType": "Attraction" },
{ "Name": "Times Square", "Latitude": 40.756631, "Longitude": -73.988369, "LocationType": "Attraction" },
{ "Name": "Central Park", "Latitude": 40.770641, "Longitude": -73.974196, "LocationType": "Attraction" },
{ "Name": "Crowne Plaza Times Square", "Latitude": 40.760342, "Longitude": -73.98482, "LocationType": "Hotel" },
{ "Name": "Sheraton New York Hotel ", "Latitude": 40.739714, "Longitude": -73.989315, "LocationType": "Hotel"}]
function displayMap()
{
document.getElementById('map_canvas').style.display = "block";
initialize();
}
function initialize() {
var myOptions =
{
zoom: 14,
center: new google.maps.LatLng(40.756631, -73.988369),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
for (i = 0; i < MarkerData.length; i++) {
var location = new google.maps.LatLng(MarkerData[i].Latitude, MarkerData[i].Longitude);
var marker = new google.maps.Marker
({
position: location,
map: map
});
iconFile = 'http://maps.google.com/mapfiles/ms/icons/red-dot.png ';
marker.setIcon(iconFile)
var title = 'Location : ' + MarkerData[i].Name;
marker.setTitle(title);
var msg = 'Location : ' + MarkerData[i].Name + '<br/> ';
msg = msg + 'Location Type : ' + MarkerData[i].LocationType + '<br/> ';
attachMessage(marker, msg);
}
}
function attachMessage(marker, msg) {
var infowindow = new google.maps.InfoWindow({
content: msg,
size: new google.maps.Size(120, 120)
});
}
</script>
</head>
<body onload="displayMap()">
<div id="map_canvas" style="width:700px; height:500px; margin-left:80px;" ></div>
</body>
</html>