Closed dhixsingh closed 11 months ago
Store coordinate in vuex store
Using mapbox-gl-draw removes mobile tap functionality across mapbox: https://github.com/mapbox/mapbox-gl-draw/issues/617
Temporary workaround outlined here: https://github.com/cityofaustin/dockless/issues/48
@dhixsingh In its current state, this works fine on devices with a mouse pointer. Some work is required in order to support mobile devices:
As per the workaround, draw controls can only be active on a mobile device while actually intending to draw. This can be done by adding draw controls when ready to select a population area, and removing the draw controls when the shape is finished being drawn.
Unfortunately this removes any features drawn with mapbox draw. I can address this by adding a polygon layer manually with the same coordinates to replace the mapbox-draw artifact.
This would solve our issue. However I would first like to make sure mobile support is considered a priority and worth spending effort on.
Let's put mobile support aside for the moment then @ayoung012. Would you mind adding a separate ticket for mobile support and list the related todo items in there.
Checked it out (using Safari). Some things to fix/adjust:
Workflow to be similar to previous version.
This goes some way towards drawing a box on the map: https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/.
We probably want the ability to enter data in a popup here just like in #6.