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

[Bug]: AreaMap cannot use numeric fields from geojson #2702

Open
hughess opened this issue Oct 31, 2024 · 0 comments
Open

[Bug]: AreaMap cannot use numeric fields from geojson #2702

hughess opened this issue Oct 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hughess
Copy link
Member

hughess commented Oct 31, 2024

Describe the bug

If you try to use a numeric field for the geoId prop of AreaMap, the areas will not render on the map. Using string fields works as expected

Steps to Reproduce

Create a map using a geojson with a numeric field (e.g., WARD in this geojson: https://opendata.dc.gov/datasets/DCGIS::wards-from-2022/about)

Logs

No response

System Info

No response

Severity

serious, but I can work around it

Additional Information, or Workarounds

Workaround:
Use a string field as the geo ID

Possible issue / solution:
In the AreaMap, there are some references that use [ ] to retrieve information from the geojson. When using a number it behaves differently than if a string was passed (assumes it is index location). The functions need to be updated to handle numeric inputs as strings so the lookup completes correctly.

Error handling should also be added to hep troubleshoot issues with geojson files and geoIDs

@hughess hughess added bug Something isn't working to-review Evidence team to review labels Oct 31, 2024
@archiewood archiewood removed the to-review Evidence team to review label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants