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

statefulMapController.fromGeoJson fails to add geometries if they don't have names. #4

Closed
jipiloub opened this issue Feb 13, 2023 · 0 comments

Comments

@jipiloub
Copy link

jipiloub commented Feb 13, 2023

Current behavior
Given a geometry without name was added to the statefulMapController with its fromGeoJson function,
When adding another geometry,
Then the first geometry is erased.

Expected behavior
The name of the geometry is somehow required. E.g. the function throws an Exception if the name is not defined.

Names in GeoJson
I'm not expert. Here are my findings.

This is a geometry without name:

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"coordinates":[[[2.6716218646834,42.725850866641956],[2.6716723333868613,42.7251191289365], [2.7276823314798353,42.98550138640216],[2.715923326897498,42.985579790834805]]],"type":"Polygon"},"properties":{"name":"Corbières Fenouillèdes"}}]}

To add a name, adding "name": "My geometry" in properties worked for me.

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

Successfully merging a pull request may close this issue.

2 participants