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

[android] Polygon holes signature refactor #8722

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

Guardiola31337
Copy link
Contributor

Refactored signature from Hole to List<LatLng>.

👀 @tobrun @ivovandongen

@Guardiola31337 Guardiola31337 added Android Mapbox Maps SDK for Android annotations Annotations on iOS and macOS or markers on Android Google Maps parity For feature parity with the Google Maps SDK for Android or iOS labels Apr 12, 2017
@@ -12,7 +12,7 @@
/**
* Encapsulates a {@link List} of {@link LatLng} points defining a hole
*/
public class Hole extends ArrayList<LatLng> implements Parcelable {
class Hole extends ArrayList<LatLng> implements Parcelable {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are removing Hole.java from public API, is there a benefit of keeping this class around?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't find a way to create a Parcelable of List<List<LatLng>>.
Do you know how?

Copy link
Contributor

@ivovandongen ivovandongen Apr 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the outermost class is parcelable it can take care of all it's members. No need for a separate class for the holes in that case. Just move the logic over to Polygon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems

List<List<LatLng>> holes = new ArrayList<>();
in.readList(holes, LatLng.class.getClassLoader());

does the trick. Fixed it 😉

@Guardiola31337 Guardiola31337 merged commit 7a66ec6 into master Apr 12, 2017
@Guardiola31337 Guardiola31337 deleted the pg-7397-android-polygon-holes branch April 12, 2017 15:45
@tobrun tobrun mentioned this pull request May 2, 2017
12 tasks
@tobrun tobrun mentioned this pull request Jun 9, 2017
12 tasks
@tobrun tobrun mentioned this pull request Jun 21, 2017
11 tasks
@tobrun tobrun mentioned this pull request Jun 30, 2017
16 tasks
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 Google Maps parity For feature parity with the Google Maps SDK for Android or iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants