From eeb58a8c21ed2a1dbda21298507691bf308f1a66 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sun, 8 Nov 2020 17:43:57 +0100 Subject: [PATCH] Display an error message when latlng is invalid --- umap/static/umap/js/umap.features.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index ce17aa0d..f4f51ae2 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -585,7 +585,7 @@ L.U.Marker = L.Marker.extend({ ]; var builder = new L.U.FormBuilder(this, coordinatesOptions, { callback: function () { - if (!this._latlng.isValid()) return; + if (!this._latlng.isValid()) return this.map.ui.alert({content: L._('Invalid latitude or longitude'), level: 'error'}); this._redraw(); this.bringToCenter(); },