Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

add support for multipolygons and polygon interior holes #1729

Closed
incanus opened this issue Jun 16, 2015 · 24 comments
Closed

add support for multipolygons and polygon interior holes #1729

incanus opened this issue Jun 16, 2015 · 24 comments
Assignees
Labels
Android Mapbox Maps SDK for Android annotations Annotations on iOS and macOS or markers on Android feature

Comments

@incanus
Copy link
Contributor

incanus commented Jun 16, 2015

Punted from #1655. Will need to be exposed in MGLPolygon as well on iOS.

@incanus incanus mentioned this issue Jun 16, 2015
16 tasks
@jfirebaugh jfirebaugh changed the title add support for polygon interior holes add support for multipolygons and polygon interior holes Dec 15, 2015
@jfirebaugh jfirebaugh added iOS Mapbox Maps SDK for iOS Android Mapbox Maps SDK for Android labels Dec 15, 2015
@jfirebaugh
Copy link
Contributor

GeoJSON sources support the full range of GeoJSON geometries. However if we want to continue expanding the annotations API, we could support this there too.

@Zakay
Copy link

Zakay commented Dec 15, 2015

+1 really need this!

@TYRONEMICHAEL
Copy link

+1

@maciekish
Copy link
Contributor

+1

2 similar comments
@dariav
Copy link

dariav commented Feb 10, 2016

+1

@MaximAlien
Copy link

+1

@aemchuk
Copy link

aemchuk commented Feb 26, 2016

+1 Will be very useful

@caHarkness
Copy link

caHarkness commented Apr 29, 2016

We have switched from Google Maps to Mapbox (on Android) for the rendering speed of polygons, but this feature is essential. We absolutely need holes!

@nealsanche
Copy link

+1 I am currently working with a mapping app with very complex polygons with holes that Google Maps API is stumbling on quite profoundly. I'd dearly love to replace it with MapBox and then found out that holes are not currently supported. If I have to, I'd work to contribute a PR to the project so that this could be supported. Would you please contact me, so that I might be about to assess the work that might be involved in making that happen?

@1ec5
Copy link
Contributor

1ec5 commented May 27, 2016

#5110 adds support for holes in polygons to the iOS and OS X SDKs. Note that, unlike in MapKit, a MGLPolygon cannot be nested more than one level deep; a concentric polygon, as it were, would be represented by an MGLMultiPolygon, which currently cannot be added to the map as a single annotation. True multipolygon support will have to wait for #5158.

1ec5 added a commit that referenced this issue May 27, 2016
MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.

Fixes #1729.

[ios, osx] Updated changelog
@nealsanche
Copy link

Last night I was able to render a polygon with holes on Android. Added the
API for adding holes to Java. Processed it in the JNI layer, and added
support in the rendering for the new data.

On Fri, May 27, 2016, 1:35 AM Minh Nguyễn [email protected] wrote:

#5110 #5110 adds support
for holes in polygons to the iOS and OS X SDKs. Note that, unlike in
MapKit, a MGLPolygon cannot be nested more than one level deep; a
concentric polygon, as it were, would be represented by an MGLMultiPolygon,
which currently cannot be added to the map as a single annotation. True
multipolygon support will have to wait for #5158
#5158.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1729 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFHsyc1aVVW4RDYPUcEFNYXJt4eMgfy2ks5qFpCagaJpZM4FD7gp
.

Robots and Pencils Inc | 1507 14th Ave SW Calgary AB T3C 0W4
You can unsubscribe from the Robots and Pencils mailing lists by clicking
here. https://robotsandpencils.com/contact/unsubscribe.html

@1ec5
Copy link
Contributor

1ec5 commented May 27, 2016

That's great, @nealsanche! Would you mind posting a pull request so we can consider your changes?

@nealsanche
Copy link

Absolutely. I will do that this morning.

On Fri, May 27, 2016, 9:35 AM Minh Nguyễn [email protected] wrote:

That's great, @nealsanche https://github.com/nealsanche! Would you mind
posting a pull request so we can consider your changes?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#1729 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFHsyY136ktyyFXW4x3Bjdl8T5bnyJQxks5qFwEegaJpZM4FD7gp
.

Robots and Pencils Inc | 1507 14th Ave SW Calgary AB T3C 0W4
You can unsubscribe from the Robots and Pencils mailing lists by clicking
here. https://robotsandpencils.com/contact/unsubscribe.html

@nealsanche
Copy link

Okay, I've added a PR: #5170

@nealsanche
Copy link

Anyway, I'm sure after seeing that PR you'll want to re-implement it. But it gets me past the hurdle I was working though.

Screenshot

@1ec5 1ec5 closed this as completed in de905ab May 28, 2016
@1ec5 1ec5 reopened this May 28, 2016
@1ec5
Copy link
Contributor

1ec5 commented May 28, 2016

#5110 has been merged and is expected to be in iOS SDK v3.3.0-beta.1 and the next OS X SDK release. Leaving this issue open for Android.

@1ec5 1ec5 added annotations Annotations on iOS and macOS or markers on Android and removed iOS Mapbox Maps SDK for iOS labels May 28, 2016
@jfirebaugh
Copy link
Contributor

jfirebaugh commented Jun 2, 2016

Polygons, multipolygons, and multiline strings are supported by the core API as of #5200.

@1ec5 1ec5 added this to the android-v4.2.0 milestone Aug 15, 2016
@ivovandongen ivovandongen removed this from the android-v4.2.0 milestone Aug 16, 2016
@ivovandongen
Copy link
Contributor

ivovandongen commented Aug 16, 2016

Removed the current milestone as this requires breaking changes to the api For now we will implement this without breaking changes

@ivovandongen ivovandongen added this to the android-v4.2.0 milestone Aug 16, 2016
@zugaldia zugaldia modified the milestones: android-future, android-v4.2.0 Sep 19, 2016
@incanus
Copy link
Contributor Author

incanus commented Oct 4, 2016

Just to clarify, we have interior hole support in iOS as of de905ab.

@cvance
Copy link

cvance commented Dec 13, 2016

will this be fixed in 4.2.0?

@1ec5
Copy link
Contributor

1ec5 commented Dec 13, 2016

No, this feature is now scheduled for v5.0.0, apparently with the expectation that adding support for multipolygons would be a breaking change.

Technically, polygon hole support could be added beforehand in v4.x (if there is another release between v4.2.0 and v5.0.0) without breaking backwards compatibility. getHoles() and setHoles() methods would be added to com.mapbox.mapboxsdk.annotations.Polygon, for compatibility with com.google.maps.model.Polygon. The underlying core support is already in place; it’s mostly a matter of plumbing through JNI.

@1ec5 1ec5 mentioned this issue Dec 13, 2016
@zugaldia zugaldia removed this from the android-v5.0.0 milestone Mar 6, 2017
@paulVulog
Copy link

@zugaldia Any update on it ? I was waiting for v5.0.0 to fixit but looks like it is no more the case...

@1ec5
Copy link
Contributor

1ec5 commented Mar 22, 2017

#7397 is the latest attempt, but someone more familiar with Android than I will need to adopt it.

@zugaldia zugaldia added this to the android-future milestone Mar 23, 2017
@tobrun tobrun modified the milestones: android-v5.1.0, android-future Apr 4, 2017
@1ec5
Copy link
Contributor

1ec5 commented Apr 11, 2017

Fixed on Android in #8557.

@1ec5 1ec5 closed this as completed Apr 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android annotations Annotations on iOS and macOS or markers on Android feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.