Display an error message when latlng is invalid
This commit is contained in:
parent
70eec17555
commit
eeb58a8c21
1 changed files with 1 additions and 1 deletions
|
@ -585,7 +585,7 @@ L.U.Marker = L.Marker.extend({
|
||||||
];
|
];
|
||||||
var builder = new L.U.FormBuilder(this, coordinatesOptions, {
|
var builder = new L.U.FormBuilder(this, coordinatesOptions, {
|
||||||
callback: function () {
|
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._redraw();
|
||||||
this.bringToCenter();
|
this.bringToCenter();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue