geoman-io / leaflet-geoman

πŸ‚πŸ—ΊοΈ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.21k stars 433 forks source link

Is it possible to set pmIgnore=true by default? #191

Closed sshikov closed 5 years ago

sshikov commented 7 years ago

Its a bit too inconvenient to set this option for each layer created, because sometime it could be created in 3rd party plugin. It would be great if I can set pmIgnore = true for all layers, and then select some layers to be handled by PM.

codeofsumit commented 7 years ago

definitely something I can add in some way or another πŸ‘ will look into it and do it if suitable

codeofsumit commented 6 years ago

closing this as I'm adopting lodashs issue management. Feature requests are marked and closed. Upvotes on the issues show popularity and help me prioritize. It also helps keeping the Issue tab clean so I can spot bugs & todos faster. A list of existing Feature Requests can be found here https://github.com/codeofsumit/leaflet.pm/issues?q=label%3A%22feature+request%22+is%3Aclosed

carueda commented 5 years ago

@codeofsumit Hi Sumit, this is a meta-question (and sorry if this is explained elsewhere): for the feature requests (which are marked closed after being entered as you indicate above), how could one, from the main list or your link, quickly tell the ones already implemented? One extra label for this purpose would be very useful.

(btw, excellent tool, many thanks for you work!)

codeofsumit commented 5 years ago

hi @carueda, good point. Up until now I've simply removed the feature request tag πŸ€” so it doesn't appear in the list anymore. Implemented features are of course visible in the Github Releases and their notes. Is that sufficient?

carueda commented 5 years ago

@codeofsumit I guess it is sufficient, thanks for the explanation!

limfinity commented 5 years ago

Hey @codeofsumit! :) First of all awesome work on the library and on keeping the community alive and tidy. πŸ’―I would love to revisit this feature request, as this seems to be currently the most upvoted one. I know 7 is not the highest of numbers, but maybe enough to talk a little more details. I'd love to offer my help in any way, if you already have some implementation ideas, maybe you could add them here, and I might be able to create a PR from that. What do you think?

codeofsumit commented 5 years ago

would be awesome if you could take a look at https://github.com/geoman-io/leaflet-geoman/pull/504 where I'm adding the optIn option.

It basically works like this: If you call this after importing leaflet-geoman:

L.PM.initialize({ optIn: true });

Only layers that have specifically set pmIgnore: false will be handled by leaflet-geoman:

L.marker([51.50915, -0.096112], { pmIgnore: false }).addTo(map);

Does that make sense?

codeofsumit commented 5 years ago

released βœ