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

Add "fly to" functionality for selected capital project #49

Closed
3 tasks
TylerMatteo opened this issue Jul 12, 2024 · 1 comment
Closed
3 tasks

Add "fly to" functionality for selected capital project #49

TylerMatteo opened this issue Jul 12, 2024 · 1 comment
Assignees

Comments

@TylerMatteo
Copy link
Contributor

TylerMatteo commented Jul 12, 2024

Acceptance Criteria

  • When a new capital project is selected and reflected in the route path params, the map should pan and zoom to center on the selected project
  • The entire project should be visible, so pan and zoom should be based on a bounding box around the entire project.
    • Note "visibility" should be in reference to the device screen, without regard to the content panels. Accounting for the content panels is non-trivial. We're simplifying this first implementation by ignoring the content panels
  • The logic for updating viewState is connected to the router such that if a user clicks between several projects and then uses the browser "back" button, the map will navigate through the projects in the browser history.

Technical Notes

  • This should use the findCapitalProjectGeoJsonByManagingCodeCapitalProjectId endpoint to be added in this Issue. It will likely make sense to replace the call to findCapitalProjectByManagingCodeCapitalProjectId added in Add capital project detail panel and connect it to route for single project #41 with a call to this new API.
  • The capital project geojson should be displayed on the map via a newly added GeoJsonLayer that is displayed on top of the tile layers. The geojson returned by the API can be passed to the data prop of the layer.
  • Use the GeoJsonLayer to show the selected color for the selected project (this is currently handled in getFillColor of the tile layer)
  • See this example for guidance on how to fit the viewState to bound of a layer
  • Should use FlyToInterpolator to transition the view state smoothly

Blocked by

* NYCPlanning/ae-zoning-api#342

@TangoYankee
Copy link
Member

Added note to ignore content panels to implement "bad" "fly-to"

@TangoYankee TangoYankee added this to the Front end implementation milestone Aug 5, 2024
@horatiorosa horatiorosa self-assigned this Aug 6, 2024
@TylerMatteo TylerMatteo self-assigned this Aug 16, 2024
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

3 participants