mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Add current location marker and remove circle around it
This commit is contained in:
parent
05fba7da03
commit
a7d35ed02d
1 changed files with 1 additions and 9 deletions
|
|
@ -245,15 +245,7 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
|||
MarkerOptions currentLocationMarkerOptions = new MarkerOptions()
|
||||
.position(new com.mapbox.mapboxsdk.geometry.LatLng(curLatLng.getLatitude(), curLatLng.getLongitude()));
|
||||
currentLocationMarkerOptions.setIcon(icon); // Set custom icon
|
||||
|
||||
List<com.mapbox.mapboxsdk.geometry.LatLng> circle = createCircleArray(curLatLng.getLatitude(), curLatLng.getLongitude(),
|
||||
curLatLng.getAccuracy() * 2, 100);
|
||||
|
||||
PolygonOptions currentLocationPolygonOptions = new PolygonOptions()
|
||||
.addAll(circle)
|
||||
.strokeColor(Color.parseColor("#55000000"))
|
||||
.fillColor(Color.parseColor("#11000000"));
|
||||
mapboxMap.addPolygon(currentLocationPolygonOptions);
|
||||
mapboxMap.addMarker(currentLocationMarkerOptions);
|
||||
}
|
||||
|
||||
//TODO: go to util
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue