add api
This commit is contained in:
@@ -8,7 +8,9 @@ import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.MogoLocationClient;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.marker.MogoMarkersHandler;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.inputtips.IMogoInputtipsSearch;
|
||||
import com.mogo.map.search.geo.MogoGeoSearch;
|
||||
@@ -39,18 +41,18 @@ public class MogoMapService implements IMogoMapService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarker addMarker( MogoMarkerOptions options ) {
|
||||
public IMogoMarker addMarker( String tag, MogoMarkerOptions options ) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarker( options );
|
||||
return MogoMap.getInstance().getMogoMap().addMarker( tag, options );
|
||||
} catch ( Exception e ) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List< IMogoMarker > addMarkers( ArrayList< MogoMarkerOptions > options, boolean moveToCenter ) {
|
||||
public List< IMogoMarker > addMarkers( String tag, ArrayList< MogoMarkerOptions > options, boolean moveToCenter ) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers( options, moveToCenter );
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers( tag, options, moveToCenter );
|
||||
} catch ( Exception e ) {
|
||||
return null;
|
||||
}
|
||||
@@ -81,6 +83,16 @@ public class MogoMapService implements IMogoMapService {
|
||||
return new MogoPoiSearch( context, query );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeMarkers( String tag ) {
|
||||
MogoMarkersHandler.getInstance().remove( tag );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeMarkers() {
|
||||
MogoMarkersHandler.getInstance().removeAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user