|
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 by Zip Codes</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[
var colors = new Array("mm_20_purple.png",
"mm_20_yellow.png", "mm_20_blue.png", "mm_20_white.png",
"mm_20_green.png", "mm_20_black.png", "mm_20_red.png",
"mm_20_orange.png", "mm_20_gray.png", "mm_20_brown.png");
var zip;
var baseIcon = new GIcon();
baseIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
//baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(12, 20);
baseIcon.shadowSize = new GSize(22, 20);
baseIcon.iconAnchor = new GPoint(6, 20);
baseIcon.infoWindowAnchor = new GPoint(5, 1);
baseIcon.infoShadowAnchor = new GPoint(18, 25);
function createMarker(point, html) {
var icon = new GIcon(baseIcon);
// icon.image = "http://www.google.com/mapfiles/markerA.png";
var lastdigit = zip.substring(4,5);
icon.image = "http://labs.google.com/ridefinder/images/" + colors[lastdigit];
var marker = new GMarker(point, icon);
// 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", "activity.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");
var marker; // = createMarkerActive(point, html);
zip = markers[i].getAttribute("zip");
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>