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] GeoView crashes when selecting feature from GeoJSON from Canadian Geographical Names Database (CGNDB) #2584

Open
1 task done
bo-lu opened this issue Nov 7, 2024 · 2 comments

Comments

@bo-lu
Copy link
Member

bo-lu commented Nov 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I add a CGNDB GeoJSON, it loads but when I click/select a feature, GeoView will crash

Expected Behavior

Returns the feature info when clicked

Steps To Reproduce

  1. Go to https://canadian-geospatial-platform.github.io/geoview/public/add-layers.html
  2. Go to Layer pane and in the URL box, put https://geogratis.gc.ca/services/geoname/en/geonames.geojson?q=ottawa&category=O,P,M&expand=items.status,items.concise,items.generic,items.province&select=items.status.term,items.concise.term,items.generic.term,items.province.description
  3. Change type to GeoJSON > Any name for the layer > Finish
  4. Let the GeoJSON load.
  5. Click any feature and then GeoView crashes

Anything else?

No response

@jolevesq
Copy link
Member

jolevesq commented Nov 13, 2024

@bo-lu How big is this query in GeoJSON, it freeze my whole Chrome browser. But in the viewer it loads quick.

Problem came from reprojection...
Failed in MapViewer.#handleMapSingleClick TypeError: coordinates must be finite numbers

Will need investigation

@bo-lu
Copy link
Member Author

bo-lu commented Nov 14, 2024

Hi Johann, the response is 260kb. It loads fine on my browser (Firefox, Edge and Chrome).

image

Maybe relevant stackoverflow post: https://stackoverflow.com/questions/38242808/openlayers3-get-map-coordinates-on-change-event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants