cityofaustin / atd-data-tech

Austin Transportation Data & Technology Services
17 stars 2 forks source link

VZV | Map | Custom polygon filter #1722

Closed atdservicebot closed 4 years ago

atdservicebot commented 4 years ago

As a user, I want to create a custom bounding area that curates the crash data based on the area that I define so that I can see crash data specific to that area.

Implement a polygon drawing tool on the map page that allows users to filter data by drawing/creating a custom polygon.

The user should be able to select an icon on the map that allows them to draw a polygon. The user should also be able to select an icon that allows them to remove the polygon and respective filter.

Use a common, out of the box solution from mapbox: https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/

Migrated from atd-vz-data #553

mddilley commented 4 years ago

Example with react-map-gl: https://github.com/uber/react-map-gl/tree/5.2-release/examples/draw-polygon

For Socrata query: https://dev.socrata.com/docs/functions/within_polygon.html