mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
include clear map into add markers method and reorder methods
This commit is contained in:
parent
c2453cb889
commit
5a8c137c87
1 changed files with 20 additions and 15 deletions
|
|
@ -198,6 +198,12 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setListeners() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all existing map markers
|
* Clears all existing map markers
|
||||||
* @param curLatLng
|
* @param curLatLng
|
||||||
|
|
@ -210,7 +216,6 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
placeList,
|
placeList,
|
||||||
getActivity(),
|
getActivity(),
|
||||||
bookmarkLocationDao.getAllBookmarksLocations());
|
bookmarkLocationDao.getAllBookmarksLocations());
|
||||||
mapboxMap.clear();
|
|
||||||
// TODO: set search latlang here
|
// TODO: set search latlang here
|
||||||
// TODO: arrange camera positions according to all other parameters
|
// TODO: arrange camera positions according to all other parameters
|
||||||
|
|
||||||
|
|
@ -226,6 +231,7 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateMapToTrackPosition(LatLng curLatLng) {
|
public void updateMapToTrackPosition(LatLng curLatLng) {
|
||||||
|
|
||||||
Timber.d("Updates map current location marker to track user location");
|
Timber.d("Updates map current location marker to track user location");
|
||||||
// Remove existing blue current location marker and add again for new location
|
// Remove existing blue current location marker and add again for new location
|
||||||
addCurrentLocationMarker(curLatLng);
|
addCurrentLocationMarker(curLatLng);
|
||||||
|
|
@ -236,10 +242,6 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
.newCameraPosition(cameraPosition), 1000);
|
.newCameraPosition(cameraPosition), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setListeners() {
|
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Adds a marker for the user's current position. Removes previous current location marker
|
* Adds a marker for the user's current position. Removes previous current location marker
|
||||||
* if exists.
|
* if exists.
|
||||||
|
|
@ -262,22 +264,14 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
currentLocationMarker = mapboxMap.addMarker(currentLocationMarkerOptions);
|
currentLocationMarker = mapboxMap.addMarker(currentLocationMarkerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSearchThisAreaButtonVisibility(boolean visible) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCurrentLocationMarkerVisible() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds markers for nearby places to mapbox map
|
* Adds markers for nearby places to mapbox map
|
||||||
*/
|
*/
|
||||||
public void addNearbyMarkersToMapBoxMap(@Nullable List<NearbyBaseMarker> baseMarkerList) {
|
public void addNearbyMarkersToMapBoxMap(@Nullable List<NearbyBaseMarker> baseMarkerList) {
|
||||||
Timber.d("addNearbyMarkersToMapBoxMap is called");
|
Timber.d("addNearbyMarkersToMapBoxMap is called");
|
||||||
|
|
||||||
|
mapboxMap.clear();
|
||||||
|
|
||||||
mapboxMap.addMarkers(baseMarkerList);
|
mapboxMap.addMarkers(baseMarkerList);
|
||||||
mapboxMap.setOnInfoWindowCloseListener(marker -> {
|
mapboxMap.setOnInfoWindowCloseListener(marker -> {
|
||||||
/*if (marker == selected) {
|
/*if (marker == selected) {
|
||||||
|
|
@ -310,6 +304,17 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSearchThisAreaButtonVisibility(boolean visible) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCurrentLocationMarkerVisible() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void prepareViewsForSheetPosition() {
|
public void prepareViewsForSheetPosition() {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue