[21931] users/mww/map.html

source_changes at macosforge.org source_changes at macosforge.org
Sun Feb 11 11:58:01 PST 2007


Revision: 21931
          http://trac.macosforge.org/projects/macports/changeset/21931
Author:   mww at macports.org
Date:     2007-02-11 11:58:01 -0800 (Sun, 11 Feb 2007)

Log Message:
-----------
tidy up

Modified Paths:
--------------
    users/mww/map.html

Modified: users/mww/map.html
===================================================================
--- users/mww/map.html	2007-02-11 19:33:16 UTC (rev 21930)
+++ users/mww/map.html	2007-02-11 19:58:01 UTC (rev 21931)
@@ -6,10 +6,11 @@
 <meta name="author" content="Markus Weissmann" />
 <meta http-equiv="content-type" content=
 "text/html; charset=us-ascii" />
-<title>MacPorts Developers</title>
+<title>MacPorts Developers Locations</title>
 </head>
 <body>
 <h2 id="id_developers_locations"><a href="http://www.macports.org/">MacPorts</a> Developers Locations</h2>
+
 <script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAA5HP32Y5kUf3iJ0ZPhQhMXBR3CdQj7cR9TjBrGtZFa91sBvPPthSEOD82Knrp2yPDBDN5Wib3QL0yZQ"
 type="text/javascript">
 </script>
@@ -25,52 +26,55 @@
 map.addControl(new GMapTypeControl());
 map.centerAndZoom(new GPoint(0, 10), 15);
 
-// Create marker icons
-var icons = new Object();
-icons['committers'] = new GIcon();
-icons['committers'].image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
-icons['committers'].shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
-icons['committers'].iconSize = new GSize(12, 20);
-icons['committers'].shadowSize = new GSize(22, 20);
-icons['committers'].iconAnchor = new GPoint(6, 20);
-icons['committers'].infoWindowAnchor = new GPoint(5, 1);
+// Create marker icon
+var icon = new Object();
+icon = new GIcon();
+icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
+icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
+icon.iconSize = new GSize(12, 20);
+icon.shadowSize = new GSize(22, 20);
+icon.iconAnchor = new GPoint(6, 20);
+icon.infoWindowAnchor = new GPoint(5, 1);
 
 // Place a marker
 function addMarker(point, name, mail, image, aux) {
-    var marker = new GMarker(point, icons['commiters']);
-    map.addOverlay(marker);
-    if ("" == mail) {
-      return;
-    }
+	var marker = new GMarker(point, icon);
+	map.addOverlay(marker);
+
+	// test for empty values
+	if ("" == mail) {
+		return;
+	}
 	if ("" == image) {
-      image="images/take_it_tux48.png";
-    }
-    if ("" == name) {
-      name = mail;
-    }
-    GEvent.addListener(marker, "click", function() {
-            marker.openInfoWindowHtml("<img width='48' height='48' src='" + image + "'/>&nbsp;<a href=\"mailto:" + mail + "\"><tt>" + name + "</tt></a><br/>" + aux);
-            });
+		image="images/take_it_tux48.png";
+	}
+	if ("" == name) {
+		name = mail;
+	}
+
+	GEvent.addListener(marker, "click", function() {
+		marker.openInfoWindowHtml("<img width='48' height='48' src='" + image + "'/>&nbsp;<a href=\"mailto:" + mail + "\"><tt>" + name + "</tt></a><br/>" + aux);
+	});
 }
 
 // Download data and show it
 var request = GXmlHttp.create();
 request.open("GET", "macports.markers.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("long")),
-                    parseFloat(markers[i].getAttribute("lat")));
-            addMarker(point,
-                    markers[i].getAttribute("name"),
-                    markers[i].getAttribute("mail"),
-                    markers[i].getAttribute("image"),
-                    ""
-                    );
-        }
-    }
+	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("long")),
+				parseFloat(markers[i].getAttribute("lat")));
+			addMarker(point,
+				markers[i].getAttribute("name"),
+				markers[i].getAttribute("mail"),
+				markers[i].getAttribute("image"),
+				""
+			);
+		}
+	}
 }
 request.send(null);
 
@@ -79,4 +83,3 @@
 
 </body>
 </html>
-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070211/687424fb/attachment.html


More information about the macports-changes mailing list