|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/mandarintools/maps/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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"/>
<meta name="robots" content="noindex,nofollow"/>
<title>Pittsburgh 1st Ward Membership</title>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAA52fGx2oAPK6PeDjhvxqHohQYyILyYZagvPvZd0lUZXY9NamzDhSQLjtrh9JphHkGEpR9jEV5qbksTg" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function createMarker(point, html) {
var marker = new GMarker(point);
// Show this marker's index in the info window when it is clicked
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
function onLoad() {
// Using XML and Asynchronous RPC ("AJAX") with Maps
//
// In this example, we download a static file ("data.xml") that contains a
// list of lat/lng coordinates in XML. When the download completes, we parse
// the XML and create a marker at each of those lat/lngs.
// Center the map on Pittsburgh
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(new GPoint(-79.947386, 40.448424), 5);
// Download the data in data.xml and load it on the map. The format we
// expect is:
// <markers>
// <marker lat="37.441" lng="-122.141"/>
// <marker lat="37.322" lng="-121.213"/>
// </markers>
var request = GXmlHttp.create();
request.open("GET", "warddata.xml", true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var xmlDoc = request.responseXML;
var markers = xmlDoc.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var point = new GPoint(parseFloat(markers[i].getAttribute("lng")),
parseFloat(markers[i].getAttribute("lat")));
var html = markers[i].getAttribute("name") + "<br>" + markers[i].getAttribute("address") + "</b>";
var marker = createMarker(point, html);
map.addOverlay(marker);
}
}
}
request.send(null);
}
//]]>
</script>
</head>
<body onload="onLoad()">
<div id="map" style="width: 800px; height: 600px"></div>
<div id="message"></div>
</body>
</html>