Display an error message when latlng is invalid

This commit is contained in:
Yohan Boniface 2020-11-08 17:43:57 +01:00
parent 70eec17555
commit eeb58a8c21

View file

@ -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();
},