community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r894501 - /comdev/nearby_people/templates/people.html
Date Tue, 29 Dec 2009 22:36:04 GMT
Author: rgardler
Date: Tue Dec 29 22:36:04 2009
New Revision: 894501

URL: http://svn.apache.org/viewvc?rev=894501&view=rev
Log:
Set a minimum zoom level when looking at a particular person.

Modified:
    comdev/nearby_people/templates/people.html

Modified: comdev/nearby_people/templates/people.html
URL: http://svn.apache.org/viewvc/comdev/nearby_people/templates/people.html?rev=894501&r1=894500&r2=894501&view=diff
==============================================================================
--- comdev/nearby_people/templates/people.html (original)
+++ comdev/nearby_people/templates/people.html Tue Dec 29 22:36:04 2009
@@ -79,6 +79,13 @@
     return marker;
 }
 
+function showDetail(uid) {
+	if (map.getZoom() < 9) {
+      map.setZoom(9);
+	}
+	map.panTo(markers[uid].getPoint())
+}
+
 //-->
 </script>
 <style type="text/css">
@@ -101,7 +108,7 @@
 	<table id="people">
 	  {% for dist, person in people %}
 		<tr>
-		  <td><a href="javascript:map.panTo(markers['{{person.uid}}'].getPoint())">{{person.name}}</a></td>
+		  <td><a href="javascript:showDetail('{{person.uid}}')">{{person.name}}</a></td>
 		  <td>{{dist|distanceformat}}</td>
 		</tr>
 	  {% endfor %}



Mime
View raw message