summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java8
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java12
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java8
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java18
4 files changed, 23 insertions, 23 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java
index 5b66237d0f..c5b4c92bd5 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java
@@ -33,7 +33,7 @@ public class QueryRenderedFeaturesBoxCountActivity extends AppCompatActivity {
final View selectionBox = findViewById(R.id.selection_box);
- //Initialize map as normal
+ // Initialize map as normal
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@@ -44,20 +44,20 @@ public class QueryRenderedFeaturesBoxCountActivity extends AppCompatActivity {
selectionBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- //Query
+ // Query
int top = selectionBox.getTop() - mapView.getTop();
int left = selectionBox.getLeft() - mapView.getLeft();
RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight());
Timber.i(String.format("Querying box %s", box));
List<Feature> features = mapboxMap.queryRenderedFeatures(box);
- //Show count
+ // Show count
Toast.makeText(
QueryRenderedFeaturesBoxCountActivity.this,
String.format("%s features in box", features.size()),
Toast.LENGTH_SHORT).show();
- //Debug output
+ // Debug output
debugOutput(features);
}
});
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java
index 9e7d5e0e03..07b677a788 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java
@@ -37,7 +37,7 @@ public class QueryRenderedFeaturesBoxHighlightActivity extends AppCompatActivity
final View selectionBox = findViewById(R.id.selection_box);
- //Initialize map as normal
+ // Initialize map as normal
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@@ -48,28 +48,28 @@ public class QueryRenderedFeaturesBoxHighlightActivity extends AppCompatActivity
selectionBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- //Query
+ // Query
int top = selectionBox.getTop() - mapView.getTop();
int left = selectionBox.getLeft() - mapView.getLeft();
RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight());
Timber.i(String.format("Querying box %s for buildings", box));
List<Feature> features = mapboxMap.queryRenderedFeatures(box, "building");
- //Show count
+ // Show count
Toast.makeText(
QueryRenderedFeaturesBoxHighlightActivity.this,
String.format("%s features in box", features.size()),
Toast.LENGTH_SHORT).show();
- //remove layer / source if already added
+ // remove layer / source if already added
try {
mapboxMap.removeSource("highlighted-shapes-source");
mapboxMap.removeLayer("highlighted-shapes-layer");
} catch (Exception exception) {
- //that's ok
+ // that's ok
}
- //Add layer / source
+ // Add layer / source
mapboxMap.addSource(
new GeoJsonSource("highlighted-shapes-source",
FeatureCollection.fromFeatures(features))
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java
index 2b3655f01e..7a4c36f30d 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java
@@ -46,7 +46,7 @@ public class QueryRenderedFeaturesBoxSymbolCountActivity extends AppCompatActivi
final View selectionBox = findViewById(R.id.selection_box);
- //Initialize map as normal
+ // Initialize map as normal
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@@ -55,7 +55,7 @@ public class QueryRenderedFeaturesBoxSymbolCountActivity extends AppCompatActivi
public void onMapReady(final MapboxMap mapboxMap) {
QueryRenderedFeaturesBoxSymbolCountActivity.this.mapboxMap = mapboxMap;
- //Add a symbol layer (also works with annotations)
+ // Add a symbol layer (also works with annotations)
try {
mapboxMap.addSource(new GeoJsonSource("symbols-source", readRawResource(R.raw.test_points_utrecht)));
} catch (IOException ioException) {
@@ -72,14 +72,14 @@ public class QueryRenderedFeaturesBoxSymbolCountActivity extends AppCompatActivi
selectionBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- //Query
+ // Query
int top = selectionBox.getTop() - mapView.getTop();
int left = selectionBox.getLeft() - mapView.getLeft();
RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight());
Timber.i(String.format("Querying box %s", box));
List<Feature> features = mapboxMap.queryRenderedFeatures(box, "symbols-layer");
- //Show count
+ // Show count
if (toast != null) {
toast.cancel();
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
index 24c30c76b5..f6cf09828d 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
@@ -42,7 +42,7 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
final float density = getResources().getDisplayMetrics().density;
- //Initialize map as normal
+ // Initialize map as normal
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@@ -50,14 +50,14 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
public void onMapReady(final MapboxMap mapboxMap) {
QueryRenderedFeaturesPropertiesActivity.this.mapboxMap = mapboxMap;
- //Add custom window adapter
+ // Add custom window adapter
addCustomInfoWindowAdapter(mapboxMap);
- //Add a click listener
+ // Add a click listener
mapboxMap.setOnMapClickListener(new MapboxMap.OnMapClickListener() {
@Override
public void onMapClick(@NonNull LatLng point) {
- //Query
+ // Query
final PointF pixel = mapboxMap.getProjection().toScreenLocation(point);
Timber.i(String.format(
"Requesting features for %sx%s (%sx%s adjusted for density)",
@@ -65,15 +65,15 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
);
List<Feature> features = mapboxMap.queryRenderedFeatures(pixel);
- //Debug output
+ // Debug output
debugOutput(features);
- //Remove any previous markers
+ // Remove any previous markers
if (marker != null) {
mapboxMap.removeMarker(marker);
}
- //Add a marker on the clicked point
+ // Add a marker on the clicked point
marker = mapboxMap.addMarker(new CustomMarkerOptions().position(point).features(features));
mapboxMap.selectMarker(marker);
}
@@ -205,7 +205,7 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
}
private CustomMarkerOptions(Parcel in) {
- //Should implement this
+ // Should implement this
}
@Override
@@ -236,7 +236,7 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
@Override
public void writeToParcel(Parcel out, int flags) {
- //Should implement this
+ // Should implement this
}
}
}