This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b671314
commit d8c1991
Showing
12 changed files
with
206 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Hole.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.mapbox.mapboxsdk.annotations; | ||
|
||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
import com.mapbox.mapboxsdk.geometry.LatLng; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Encapsulates a {@link List} of {@link LatLng} points defining a hole | ||
*/ | ||
public class Hole extends ArrayList<LatLng> implements Parcelable { | ||
|
||
public Hole() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Creates a Hole. | ||
* | ||
* @param holePoints {@link List} list of {@link LatLng} points defining a hole | ||
*/ | ||
public Hole(List<LatLng> holePoints) { | ||
super(holePoints); | ||
} | ||
|
||
protected Hole(Parcel in) { | ||
in.readTypedList(this, LatLng.CREATOR); | ||
} | ||
|
||
@Override | ||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel parcel, int i) { | ||
parcel.writeTypedList(this); | ||
} | ||
|
||
public static final Parcelable.Creator<Hole> CREATOR = new Parcelable.Creator<Hole>() { | ||
public Hole createFromParcel(Parcel in) { | ||
return new Hole(in); | ||
} | ||
|
||
public Hole[] newArray(int size) { | ||
return new Hole[size]; | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.