Always set the latlon value when we place the marker, not just when
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 16 Dec 2009 20:18:45 +0000 (15:18 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 16 Dec 2009 20:19:46 +0000 (15:19 -0500)
we successfully geocode

kronolith/js/kronolith.js

index 45323b0..cf5e08b 100644 (file)
@@ -3668,8 +3668,6 @@ KronolithCore = {
         r = r.shift();
         ll = new OpenLayers.LonLat(r.lon, r.lat);
         this.placeMapMarker({ lat: r.lat, lon: r.lon }, true);
-        $('kronolithEventLocationLon').value = r.lon;
-        $('kronolithEventLocationLat').value = r.lat;
     },
 
     geocode: function(a) {
@@ -3697,6 +3695,8 @@ KronolithCore = {
         } else {
             this.map.moveMarker(this.mapMarker, ll);
         }
+        $('kronolithEventLocationLon').value = ll.lon;
+        $('kronolithEventLocationLat').value = ll.lat;
         if (center) {
             this.map.setCenter(ll, 8);
             //this.map.zoomToFit();