Git Product home page Git Product logo

Comments (3)

kuzkok avatar kuzkok commented on May 29, 2024

No idea. Can you publish full code listing?

from leaflet-wfst.

carrbrpoa avatar carrbrpoa commented on May 29, 2024

Found something!

It seems to be associated with Leaflet's version: your polygon geoJSON example is using Leaflet 0.7.3, while I was trying at least with 1.0.0.beta.1.

The problem is that with 1.0.0.beta.1 and above (at least), the following code of your EditToolbar.js is being executed when I click a polygon after the first time:

map.once('click', function () { // Line 65 of EditToolbar.js
    map.removeLayer(that);
});

plunkr with 1.0.0.beta.1 and your sample data. See how it works when you change to 0.7.3.

from leaflet-wfst.

carrbrpoa avatar carrbrpoa commented on May 29, 2024

It's an expected behaviour.

So, the following modification in EditToolbar.js keeps the popup working as expected:

map.once('click', function (e) {
    map.removeLayer(that);
});
shape.once('click', function (e) {
    map.removeLayer(that);
    L.DomEvent.stopPropagation(e);
});

from leaflet-wfst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.