|
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 East/West Division</title>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA52fGx2oAPK6PeDjhvxqHohQYyILyYZagvPvZd0lUZXY9NamzDhSQLjtrh9JphHkGEpR9jEV5qbksTg" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var baseIcon = new GIcon();
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);
function createMarkerActive(point, html) {
var icon = new GIcon(baseIcon);
icon.image = "markerA.png";
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 createMarkerInactive(point, html) {
var icon = new GIcon(baseIcon);
icon.image = "http://www.google.com/mapfiles/markerI.png";
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);
var polyline = new GPolyline([
new GLatLng(40.488541589366456, -79.93721008300781),
new GLatLng(40.48175240534183, -79.95351791381836),
new GLatLng(40.478292268560175, -79.95583534240723),
new GLatLng(40.47731295218569, -79.95386123657227),
new GLatLng(40.47809640642807, -79.94905471801758),
new GLatLng(40.47757410461564, -79.94665145874023),
new GLatLng(40.48188297304919, -79.94038581848145),
new GLatLng(40.479924430772954, -79.93326187133789),
new GLatLng(40.47326495962399, -79.9310302734375),
new GLatLng(40.471567341726164, -79.92605209350586),
new GLatLng(40.45824608115787, -79.93386268615723),
new GLatLng(40.45824608115787, -79.93463516235352),
new GLatLng(40.44407301696414, -79.92596626281738),
new GLatLng(40.44394237574253, -79.92390632629395),
new GLatLng(40.43819391062477, -79.9229621887207),
new GLatLng(40.43478052688552, -79.92282271385193),
new GLatLng(40.42979079533944, -79.92350935935974),
new GLatLng(40.429570291295356, -79.9236810207367),
new GLatLng(40.427512218686935, -79.92809057235718),
new GLatLng(40.42665466984571, -79.92684602737427),
new GLatLng(40.42617280427025, -79.92667436599731),
new GLatLng(40.423044677693746, -79.92757558822632),
new GLatLng(40.422031884913075, -79.92774724960327),
new GLatLng(40.41961418888908, -79.92713570594788),
new GLatLng(40.419173113350965, -79.9269962310791),
new GLatLng(40.41815209406641, -79.92613792419434),
new GLatLng(40.41664912548791, -79.92576241493225),
new GLatLng(40.415007257311586, -79.92449641227722),
new GLatLng(40.405996690433305, -79.91221189498901)
], "#FF0000", 10);
map.addOverlay(polyline);
// 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", "1stb.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);
var activity = markers[i].getAttribute("unit");
if (activity == "EAST")
marker = createMarkerActive(point, html);
else
marker = createMarkerInactive(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>