Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
added within poi circle polygon filter example
Browse files Browse the repository at this point in the history
  • Loading branch information
Langston Smith committed May 4, 2020
1 parent 1f43cd3 commit 8222356
Show file tree
Hide file tree
Showing 10 changed files with 467 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import com.mapbox.mapboxandroiddemo.examples.javaservices.StraightLineDistanceMapMovementActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.StaticImageNotificationActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.TilequeryActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.TurfCirclePoiWithinFilterActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.TurfLineDistanceActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.TurfPhysicalCircleActivity;
import com.mapbox.mapboxandroiddemo.examples.javaservices.TurfRingActivity;
Expand Down Expand Up @@ -1165,6 +1166,14 @@ private void initializeModels() {
null,
R.string.activity_java_services_directions_profile_toggle_url, true, BuildConfig.MIN_SDK_VERSION));

exampleItemModels.add(new ExampleItemModel(
R.id.nav_java_services,
R.string.activity_java_services_turf_circle_poi_within_filter_title,
R.string.activity_java_services_turf_circle_poi_within_filter_description,
new Intent(MainActivity.this, TurfCirclePoiWithinFilterActivity.class),
null,
R.string.activity_java_services_turf_circle_poi_within_filter_url, true, BuildConfig.MIN_SDK_VERSION));

exampleItemModels.add(new ExampleItemModel(
R.id.nav_snapshot_image_generator,
R.string.activity_image_generator_snapshot_notification_title,
Expand Down
8 changes: 8 additions & 0 deletions MapboxAndroidDemo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,14 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
</activity>
<activity
android:name=".examples.javaservices.TurfCirclePoiWithinFilterActivity"
android:label="@string/activity_java_services_turf_circle_poi_within_filter_title"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
</activity>
<activity
android:name=".examples.javaservices.DirectionsProfileToggleActivity"
android:label="@string/activity_java_services_directions_profile_toggle_title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void onFailure(Call<FeatureCollection> call, Throwable throwable) {
* @return a list of {@link LatLng}.
*/
private List<LatLng> createLatLngsForCameraBounds(List<Feature> featureList) {
List<LatLng> latLngList = new ArrayList(featureList.size());
List<LatLng> latLngList = new ArrayList<>(featureList.size());
for (Feature singleFeature : featureList) {
for (Point singlePoint : TurfMeta.coordAll(singleFeature, false)) {
latLngList.add(new LatLng((singlePoint.latitude()), singlePoint.longitude()));
Expand Down
Loading

0 comments on commit 8222356

Please sign in to comment.