fix bug and wait to finish
This commit is contained in:
@@ -42,10 +42,20 @@ public interface IMogoMarkerManager {
|
||||
void removeMarkers( String tag );
|
||||
|
||||
/**
|
||||
* 移除地图上所有markers
|
||||
* 移除地图上添加的所有markers
|
||||
*/
|
||||
void removeMarkers();
|
||||
|
||||
/**
|
||||
* 显示地图上添加的所有markers
|
||||
*/
|
||||
void visibleAllMarkers();
|
||||
|
||||
/**
|
||||
* 隐藏地图上添加的所有markers
|
||||
*/
|
||||
void inVisibleAllMarkers();
|
||||
|
||||
/**
|
||||
* 获取某种类型的全部marker。
|
||||
*
|
||||
@@ -53,6 +63,7 @@ public interface IMogoMarkerManager {
|
||||
* @return
|
||||
*/
|
||||
List< IMogoMarker > getMarkers( String tag );
|
||||
|
||||
/**
|
||||
* 获取所有类型的marker。
|
||||
*
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.IMogoMapListenerRegister;
|
||||
|
||||
@@ -43,6 +47,20 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void visibleAll(){
|
||||
mServicesMarkers.values().stream()
|
||||
.filter(mogoMarkerList -> mogoMarkerList != null && !mogoMarkerList.isEmpty())
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> mogoMarker.setVisible(true)));
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void inVisibleAll(){
|
||||
mServicesMarkers.values().stream()
|
||||
.filter(mogoMarkerList -> mogoMarkerList != null && !mogoMarkerList.isEmpty())
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> mogoMarker.setVisible(false)));
|
||||
}
|
||||
|
||||
public synchronized void removeAll() {
|
||||
final Collection< List< IMogoMarker > > mogoMarkers = mServicesMarkers.values();
|
||||
for ( List< IMogoMarker > mogoMarkerList : mogoMarkers ) {
|
||||
|
||||
Reference in New Issue
Block a user