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.
[android] #352 - introducing FeatureWrapper, added PolygonFeature, de…
…tecting polygons correctly
- Loading branch information
Showing
5 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...oid/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/FeatureWrapper.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,17 @@ | ||
package com.mapbox.mapboxsdk.annotations; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class FeatureWrapper { | ||
|
||
private List<Feature> features; | ||
|
||
public FeatureWrapper() { | ||
features = new ArrayList<>(); | ||
} | ||
|
||
public void setFeatures(List<Feature>features){ | ||
this.features = features; | ||
} | ||
} |
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
27 changes: 27 additions & 0 deletions
27
...oid/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/PolygonFeature.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,27 @@ | ||
package com.mapbox.mapboxsdk.annotations; | ||
|
||
import java.util.Map; | ||
|
||
public class PolygonFeature extends Polygon implements Feature { | ||
|
||
private long featureId; | ||
private Map<String, Object> attributes; | ||
|
||
public PolygonFeature() { | ||
} | ||
|
||
@Override | ||
public long getFeatureId() { | ||
return featureId; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
@Override | ||
public Object getAttribute(String key) { | ||
return attributes.get(key); | ||
} | ||
} |
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