do not bind popup to new feature – otherwise the content can be reset

This commit is contained in:
Laura Klünder 2016-08-22 19:57:25 +02:00
parent 5c65421096
commit eb37ffef5a

View file

@ -132,9 +132,10 @@ map.on('editable:drawing:commit', function (e) {
currently_adding = e.layer;
$('.leaflet-editbar .current').removeClass('current');
e.layer.disableEdit();
e.layer.bindPopup('<img src="{% static "img/loader.gif" %}">', {
closeButton: false
}).openPopup();
L.popup({
closeButton: false,
autoClose: false,
}).setContent('<img src="{% static "img/loader.gif" %}">').setLatLng(e.layer.getCenter()).openOn(map);
console.log(e.layer.toGeoJSON());
}).on('editable:drawing:cancel', function (e) {
if (currently_drawing === null && currently_adding === null) {