fix bug of delay time problem and invisible marker when change visual problem
This commit is contained in:
@@ -56,6 +56,12 @@ public interface IMogoMarkerManager {
|
||||
*/
|
||||
void inVisibleAllMarkers();
|
||||
|
||||
/**
|
||||
* 隐藏除了某些类别的所有marker {@link MogoMarkerOptions Owner}
|
||||
* @param owner
|
||||
*/
|
||||
void inVisibleWithoutMarkers(String owner); //todo 后续需要把Owner类别统一起来,基类下沉,此接口为临时方案,应该设计为隐藏某一类元素
|
||||
|
||||
/**
|
||||
* 获取某种类型的全部marker。
|
||||
*
|
||||
|
||||
@@ -61,6 +61,17 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> mogoMarker.setVisible(false)));
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void inVisibleMarkers(String owner){
|
||||
mServicesMarkers.values().stream()
|
||||
.filter(mogoMarkerList -> mogoMarkerList != null && !mogoMarkerList.isEmpty())
|
||||
.forEach(mogoMarkerList -> mogoMarkerList.forEach(mogoMarker -> {
|
||||
if(TextUtils.isEmpty(mogoMarker.getOwner()) || !mogoMarker.getOwner().equals(owner)){
|
||||
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