修改了Marker的高亮展示逻辑,效率更高

This commit is contained in:
董宏宇
2020-01-15 14:00:33 +08:00
parent 6b840de0a8
commit bbf538d845
5 changed files with 43 additions and 69 deletions

View File

@@ -6,6 +6,7 @@ import com.mogo.map.MogoLatLng;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author congtaowang
@@ -52,6 +53,12 @@ public interface IMogoMarkerManager {
* @return
*/
List< IMogoMarker > getMarkers( String tag );
/**
* 获取所有类型的marker。
*
* @return
*/
Map< String, List< IMogoMarker > > getAllMarkers( );
/**
* 仅保留指定类型的tag

View File

@@ -77,6 +77,11 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
}
public synchronized Map< String, List< IMogoMarker > > getAllMarkers() {
return mServicesMarkers;
}
public synchronized void add( String tag, IMogoMarker marker ) {
if ( marker == null ) {
return;