Coder Social home page Coder Social logo

Popup Example ? about leaflet.draw HOT 6 CLOSED

chugcup avatar chugcup commented on August 19, 2024
Popup Example ?

from leaflet.draw.

Comments (6)

chugcup avatar chugcup commented on August 19, 2024

Hey @Dot2122, do you mean popups on Markers or other types of shapes? The README should have an example on how to bind a popup based on the draw:created event for Markers.

In the meantime I will try to add an example page that includes popup management (including after edits)

from leaflet.draw.

chugcup avatar chugcup commented on August 19, 2024

See f7cc20c

from leaflet.draw.

Dot2122 avatar Dot2122 commented on August 19, 2024

Thanks @chugcup for your answer.

I'll check your link.

For information, popup I was talking is popup edition (http://leaflet.github.io/Leaflet.toolbar/examples/popup.html#)
Can I do it with draw:created ?

from leaflet.draw.

chugcup avatar chugcup commented on August 19, 2024

Ahh I see. Yes that example you linked to uses the Leaflet.draw library and binds the L.EditToolbar.Popup object during the draw:edited event. Since the event API has not changed you should have no problem implementing the same thing

Leaflet.toolbar/examples/popup.html

from leaflet.draw.

Dot2122 avatar Dot2122 commented on August 19, 2024

Yes, but the sample is not working with the lasted version of leaflet.draw.
Because, I think, L.EditToolbar.Popup is not exist in the new version

from leaflet.draw.

chugcup avatar chugcup commented on August 19, 2024

Hi, it seems that example uses a fork of the main Leaflet.draw repository:

https://github.com/justinmanley/Leaflet.draw/tree/leaflet-toolbar-plugin

Since my fork is based off the main repository (and the author never submitted a pull request), the L.Edit.Popup.Edit class is not available so that example won't work. If you wanted to get it integrated you would probably need to copy the extra files from the src/edit and src/draw folders and try to run it

from leaflet.draw.

Related Issues (4)

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.