Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please reimplement this as a map object #117

Open
marcinn opened this issue Dec 14, 2018 · 1 comment
Open

Please reimplement this as a map object #117

marcinn opened this issue Dec 14, 2018 · 1 comment

Comments

@marcinn
Copy link

marcinn commented Dec 14, 2018

Hi.

Current implementation is something like an extension of Map/Marker object. This is a huge limitation. ContextMenu should be implemented as standalone layer (like Popup), should inherit from Layer/DivOverlay. Expose CM events (item-clicked, etc) instead of callback per menu item. What for? I.e. for using leaflet's event handling interface, which is currently not possible. Shortcut for creating menu via Map/Marker options may be preserved.

Thanks.

@aratcliffe
Copy link
Owner

Hi Marcin, I agree with your assessment. I wrote this plugin some years ago at a time when we were replacing our proprietary maps API with Leaflet and wanted to keep the interface as similar as possible to the existing popup implementation for compatibility reasons. As we're now exclusively working with Mapbox GL it's unlikely that I'll have the time to write another version for Leaflet but if I was to I'd do something similar to what you propose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants