From ae2a5ab4269599730e75cab324e86f9c33a7f0a8 Mon Sep 17 00:00:00 2001
From: langsmith <langstonlmcs@gmail.com>
Date: Tue, 23 Apr 2019 13:23:06 -0700
Subject: [PATCH] initial refactoring

---
 .../examples/javaservices/IsochroneActivity.java              | 2 +-
 .../examples/javaservices/OptimizationActivity.java           | 3 +--
 .../examples/javaservices/TilequeryActivity.java              | 3 +--
 .../examples/labs/LocationPickerActivity.java                 | 4 +---
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/IsochroneActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/IsochroneActivity.java
index bdd23b917..8f4df89c7 100644
--- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/IsochroneActivity.java
+++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/IsochroneActivity.java
@@ -123,7 +123,7 @@ public boolean onMapClick(@NonNull LatLng point) {
     if (style != null) {
       GeoJsonSource source = style.getSourceAs("click-source-id");
       if (source != null) {
-        source.setGeoJson(Feature.fromGeometry(Point.fromLngLat(point.getLongitude(), point.getLatitude())));
+        source.setGeoJson(Point.fromLngLat(point.getLongitude(), point.getLatitude()));
       }
 
       // Request and redraw the Isochrone information based on the map click point
diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/OptimizationActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/OptimizationActivity.java
index 9509b1564..df05ddecb 100644
--- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/OptimizationActivity.java
+++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/OptimizationActivity.java
@@ -160,8 +160,7 @@ public boolean onMapLongClick(@NonNull LatLng point) {
   private void resetDestinationMarkers(@NonNull Style style) {
     GeoJsonSource optimizedLineSource = style.getSourceAs(ICON_GEOJSON_SOURCE_ID);
     if (optimizedLineSource != null) {
-      optimizedLineSource.setGeoJson(Feature.fromGeometry(Point.fromLngLat(origin.longitude(),
-        origin.latitude())));
+      optimizedLineSource.setGeoJson(Point.fromLngLat(origin.longitude(), origin.latitude()));
     }
   }
 
diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/TilequeryActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/TilequeryActivity.java
index 30be6f7d1..8f46e876b 100644
--- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/TilequeryActivity.java
+++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/javaservices/TilequeryActivity.java
@@ -138,8 +138,7 @@ public boolean onMapClick(@NonNull LatLng point) {
       // Move and display the click center layer's red marker icon to wherever the map was clicked on
       GeoJsonSource clickLocationSource = style.getSourceAs(CLICK_CENTER_GEOJSON_SOURCE_ID);
       if (clickLocationSource != null) {
-        clickLocationSource.setGeoJson(Feature.fromGeometry(Point.fromLngLat(point.getLongitude(),
-          point.getLatitude())));
+        clickLocationSource.setGeoJson(Point.fromLngLat(point.getLongitude(), point.getLatitude()));
       }
 
       // Use the map click location to make a Tilequery API call
diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/labs/LocationPickerActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/labs/LocationPickerActivity.java
index 5297ec870..78d7466ef 100644
--- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/labs/LocationPickerActivity.java
+++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/labs/LocationPickerActivity.java
@@ -20,7 +20,6 @@
 import com.mapbox.api.geocoding.v5.models.CarmenFeature;
 import com.mapbox.api.geocoding.v5.models.GeocodingResponse;
 import com.mapbox.core.exceptions.ServicesException;
-import com.mapbox.geojson.Feature;
 import com.mapbox.geojson.Point;
 import com.mapbox.mapboxandroiddemo.R;
 import com.mapbox.mapboxsdk.Mapbox;
@@ -129,8 +128,7 @@ public void onClick(View view) {
               if (style.getLayer(DROPPED_MARKER_LAYER_ID) != null) {
                 GeoJsonSource source = style.getSourceAs("dropped-marker-source-id");
                 if (source != null) {
-                  source.setGeoJson(Feature.fromGeometry(Point.fromLngLat(
-                    mapTargetLatLng.getLongitude(), mapTargetLatLng.getLatitude())));
+                  source.setGeoJson(Point.fromLngLat(mapTargetLatLng.getLongitude(), mapTargetLatLng.getLatitude()));
                 }
                 style.getLayer(DROPPED_MARKER_LAYER_ID).setProperties(visibility(VISIBLE));
               }