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

KML writeFeatures error with some MultiGeometries #10631

Closed
mike-000 opened this issue Feb 10, 2020 · 0 comments · Fixed by #10646
Closed

KML writeFeatures error with some MultiGeometries #10631

mike-000 opened this issue Feb 10, 2020 · 0 comments · Fixed by #10646

Comments

@mike-000
Copy link
Contributor

Describe the bug
Another issue was found while testing a fix for #10614
MultiGeometries which have been read by ol/format/KML fail to write back if they contain MultiPolgons (or MultLineStrings or MultiPoints).

To Reproduce
Open the Drag and Drop example in codesandbox and add

  console.log(new KML().writeFeatures([event.features[0]], {
    dataProjection: 'EPSG:4326', featureProjection:'EPSG:3857'}));
  console.log(new KML().writeFeatures([event.features[1]], {
    dataProjection: 'EPSG:4326', featureProjection:'EPSG:3857'}));

to the addfeatures event handler then download https://github.com/openlayers/openlayers/blob/master/test/spec/ol/format/kml/states.kml and drag it to the example.

Alabama (a multigeometry consisting of a point and single polygon) is written back successfully.
Alaska (a multigeometry consisting of a point and multipolygon) fails.

Expected behavior
The writeMultiGeometry function needs to break MultiPolgons, MultLineStrings and MultiPoints within a non-homogenous geometry collection into their component parts as it does with homogenous MultiGeometry.

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.

1 participant