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

Commit

Permalink
initial refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
langsmith committed Apr 23, 2019
1 parent fd326ed commit dd35c82
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,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));
}
Expand Down

0 comments on commit dd35c82

Please sign in to comment.