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

Neighborhood Council Support - Draw Neighborhood Boundary on Map #1165

Closed
4 of 5 tasks
entrotech opened this issue Mar 9, 2022 · 6 comments · Fixed by #1166
Closed
4 of 5 tasks

Neighborhood Council Support - Draw Neighborhood Boundary on Map #1165

entrotech opened this issue Mar 9, 2022 · 6 comments · Fixed by #1166
Assignees
Labels
Documentation Improvements or additions to documentation P-Feature: Map Food seeker map view Release Note: Enhancement Shows on Release Notes under "Enhancements" Role: Back-end Node/Express Development Task Role: Database Role: Front-end Front End Developer size: 5pt The lift to complete this user story 8-16hrs

Comments

@entrotech
Copy link
Member

entrotech commented Mar 9, 2022

Overview

To support embedding on a neighborhood council web site, we need to support a neighborhood_id query string parameter, and then retrieve the GeoJSON of the neighborhood (PostGIS) geometry from the neighborhood table, and render the region on MapBox. The default center of the map should be set to the geographic centroid of the neighborhood.

To use this, you will need to use a url like:

la.foodoasis.net/organizations?neighborhood_id=78

The number used should be the nc_id from the official Nieghborhood Council list referenced in the Resources section. (e.g. 78 is "SOUTH CENTRAL NC").

Action Items

  • Create a web api endpoint to retrieve a single neighborhood GeoJSON shape file from the database - include the calculated latitude, longitude of the region's centroid as part of this data for later use when we work on centering the map on the region.
  • retrieve any neighborhood_id query string parameter from the url to control which, if any, neighborhood is rendered.
  • When the neighborhood_id state value is present, call the above web api endpoint to retrieve the GeoJSON shape file, and render the region as a layer on the map, using the centroid of the neighborhood as the default centerpoint of the map
  • Update the embedding instructions with a lookup table(?) of neighborhoods to create the custom URL on the wiki instructions page?
  • QA!

Resources/Instructions

@entrotech entrotech self-assigned this Mar 9, 2022
@entrotech entrotech added P-Feature: Map Food seeker map view Release Note: Enhancement Shows on Release Notes under "Enhancements" Role: Back-end Node/Express Development Task Role: Database Role: Front-end Front End Developer size: 5pt The lift to complete this user story 8-16hrs labels Mar 9, 2022
@entrotech
Copy link
Member Author

This is implemented to read the neighborhood_id from the url. As you move around in the application the query string currently gets re-written by code associated with OrganizationDetails, which does not preserve the neighborhood_id part of the queryString, and the region will no longer be rendered. We need a follow-up issue to modify the query string re-writing to maintain the neighborhood_id, if present. This cannot be done until issue 989 is resolved.

@fancyham
Copy link
Collaborator

@entrotech is there a list of URLs we could try for testing or a base URL to start with and try using different id numbers?

@fancyham
Copy link
Collaborator

fancyham commented Apr 22, 2022

Cool!

  • When you @entrotech have a chance, could you list some test URLs so we can play with the regions?
  • Maybe we shouldn put embedding instructions and a lookup table of neighborhoods for that custom URL on the wiki?

Once we can QA (@sei1122), I think we can close this and a bunch of other issues in the Embeddable Widget milestone!

@fancyham
Copy link
Collaborator

fancyham commented Apr 22, 2022

Sorry! Just realized we need this: added action items to revise instructions for the new neighborhood-displaying URLs

@fancyham fancyham reopened this Apr 22, 2022
@fancyham fancyham added the Documentation Improvements or additions to documentation label Apr 22, 2022
@entrotech
Copy link
Member Author

I updated the wiki with instructions. Ready for QA.

@fancyham
Copy link
Collaborator

fancyham commented Jun 5, 2022

QA: Looks good!

I followed the wiki instructions for one neighborhood and it worked as advertised. Easy to follow instructions, too.

QA done — closing issue!

@fancyham fancyham closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation P-Feature: Map Food seeker map view Release Note: Enhancement Shows on Release Notes under "Enhancements" Role: Back-end Node/Express Development Task Role: Database Role: Front-end Front End Developer size: 5pt The lift to complete this user story 8-16hrs
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants