From: Michael J. Rubinsky Date: Sat, 13 Feb 2010 15:24:13 +0000 (-0500) Subject: Delete the mapMarker when clearing the Location text field X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b99bbb862b51835c6d330366bbe1159c22f82e0c;p=horde.git Delete the mapMarker when clearing the Location text field --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 191988a1c..c94a94ec4 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2511,6 +2511,7 @@ KronolithCore = { $('kronolithEventMapLink').show(); } else if (Kronolith.conf.maps.driver) { $('kronolithEventMapLink').hide(); + this.removeMapMarker(); } return; } @@ -3781,6 +3782,19 @@ KronolithCore = { } }, + /** + * Remove the event marker from the map. Called after clearing the location + * field. + */ + removeMapMarker: function() + { + if (this.mapMarker) { + this.map.removeMarker(this.mapMarker); + $('kronolithEventLocationLon').value = null; + $('kronolithEventLocationLat').value = null; + } + }, + ensureMap: function() { if (!this.mapInitialized) {