Removed the street address from influencing the maps plug in.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 07 Mar 2009 17:55:14 +0000
changeset 1720 33e34c4716d2
parent 1719 328db0964f86
child 1721 9acf4fe1b9bb
Removed the street address from influencing the maps plug in. Legally we are not allowed to publish people's street address, people can drag the marker to their street if they wish to, we are now using the postal code which would be a region within a city (if this is too much we might also take this out). Patch by: Mario Ferraro Reviewed by: Lennard de Rijk
app/soc/content/js/map-090307.js
--- a/app/soc/content/js/map-090307.js	Sat Mar 07 17:36:32 2009 +0000
+++ b/app/soc/content/js/map-090307.js	Sat Mar 07 17:55:14 2009 +0000
@@ -17,7 +17,7 @@
   var country_zoom = 4;
   var state_zoom = 6;
   var city_zoom = 10;
-  var address_zoom = 13;
+  var postalcode_zoom = 12;
 
   // Do not add a starting # as this JQuery selector seems 
   // incompatible with GMap API
@@ -28,10 +28,6 @@
   // Need to save old values to avoid unwanted updating 
   // of lat and lot if marker dragged and blur another time an address field
   var address = {
-    street: {
-      id: "#id_res_street",
-      old_value: ""
-    },
     city: {
       id: "#id_res_city",
       old_value: ""
@@ -100,7 +96,7 @@
             saveOldAddress();
             // Set the new zoom, map center and marker coords
             var zoom_set = world_zoom;
-            if ($(address.street.id).val()!="") zoom_set = address_zoom;
+            if ($(address.postalcode.id).val()!="") zoom_set = postalcode_zoom;
             else if ($(address.city.id).val()!="") zoom_set = city_zoom;
             else if ($(address.state.id).val()!="") zoom_set = state_zoom;
             else if ($(address.country.id).val()!="") zoom_set = country_zoom;