onaio / kujaku

Mapping and check-in library for Android using MapBox SDK
https://ona.io
BSD 2-Clause "Simplified" License
18 stars 11 forks source link

Improve handling of MultiPolygons when drawing boundaries #340

Open Rkareko opened 4 years ago

Rkareko commented 4 years ago

The startDrawing method in the DrawingManager has been updated to handle editing BoundaryLayers made of MultiPolygons in this PR https://github.com/onaio/kujaku/pull/339

The current implementation only enables editing the first polygon in the list of polygons. This assumes that the other polygons are not required. This also means that the new boundary will no longer be a MultiPolygon but a Polygon. All other polygons will be discarded.

A multipolygon can contain holes or can be used to represent a feature that is made of of multiple scattered polygons.

An example being in case you want to edit the boundary of Mombasa which is part of the Kenya boundary but an island thus forms a polygon by it's own

Improvements have to be made to accommodate this