-
Notifications
You must be signed in to change notification settings - Fork 591
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
Custom Modes #289
Comments
@mcwhittemore any ideas on how to implement this? It seems pretty tricky because the modes are so closely tied to some of the api methods ala https://github.com/mapbox/mapbox-gl-draw/blob/master/src/api.js#L129 instead of falling back to the larger mode modules. Happy to kick around some ideas + code as we're looking to use this again in another project with some custom behavior |
Actually, the more I look; the file I mentioned is really the only place where the modularity of the mode system breaks down a little (nice job!). Would the next steps to implementing this feature be something like:
Edit: noting that much of the second bullet is covered via the Draw Mode README |
@drewbo sorry for just seeing this. Those bullet points seem right to me. We'll want to make sure the API for these modes is really pretty solid. Asking people to write custom modes and then breaking the API a few times won't be good. My key concern is cleaning up how events are handled/registered. |
Here is a ticket where @davidtheclark and I are talking about this problem - #459 |
@mcwhittemore @drewbo I think GeoJSON support rectangle... as I have seen in this Demo and map seems mapbox. |
Moved my reply to #604 |
The modularity provided by a mode system should be exposed to end-users so they can replace out the default interactions with their own.
The text was updated successfully, but these errors were encountered: