MapEventSource

public class MapEventSource extends MapContentProviderHelper

Fields

BUNDLE_DONE_KEY

protected static final String BUNDLE_DONE_KEY

BUNDLE_ID_KEY

protected static final String BUNDLE_ID_KEY

BUNDLE_TYPE_KEY

protected static final String BUNDLE_TYPE_KEY

BUNDLE_X_KEY

protected static final String BUNDLE_X_KEY

BUNDLE_Y_KEY

protected static final String BUNDLE_Y_KEY

BUNDLE_ZOOM_KEY

protected static final String BUNDLE_ZOOM_KEY

EVENT_onExtentChanged

protected static final int EVENT_onExtentChanged

EVENT_onLayerAdded

protected static final int EVENT_onLayerAdded

EVENT_onLayerChanged

protected static final int EVENT_onLayerChanged

EVENT_onLayerDeleted

protected static final int EVENT_onLayerDeleted

EVENT_onLayerDrawFinished

protected static final int EVENT_onLayerDrawFinished

EVENT_onLayerDrawStarted

protected static final int EVENT_onLayerDrawStarted

EVENT_onLayersReordered

protected static final int EVENT_onLayersReordered

SKIP_TIMEOUT

public static final int SKIP_TIMEOUT

mFreeze

protected boolean mFreeze

mHandler

protected static Handler mHandler

mLastMessages

protected Map<Integer, Long> mLastMessages

mListeners

protected List<MapEventListener> mListeners

Constructors

MapEventSource

public MapEventSource(Context context, File mapPath, LayerFactory layerFactory)

Methods

addListener

public void addListener(MapEventListener listener)

Add new listener for map events

Параметры:
  • listener – A listener class implements MapEventListener adding to listeners array

createHandler

protected void createHandler()

Create handler for messages

freeze

public void freeze()

onDrawFinished

public void onDrawFinished(int id, float percent)

onExtentChanged

protected void onExtentChanged(float zoom, GeoPoint center)

Send extent change event to all listeners

Параметры:
  • zoom – A zoom level
  • center – A map center coordinates

onLayerAdded

protected void onLayerAdded(ILayer layer)

Send layer added event to all listeners

Параметры:
  • layer – A new layer

onLayerChanged

protected void onLayerChanged(ILayer layer)

Send layer changed event to all listeners

Параметры:
  • layer – A changed layer

onLayerDeleted

protected void onLayerDeleted(int id)

Send layer delete event to all listeners

Параметры:
  • id – A deleted layer identificator

onLayerDrawFinished

protected void onLayerDrawFinished(int id, float percent)

Send layers draw finished event to all listeners

onLayerDrawStarted

protected void onLayerDrawStarted()

Send layers draw started event to all listeners

onLayersReordered

protected void onLayersReordered()

Send layers reordered event to all listeners

removeListener

public void removeListener(MapEventListener listener)

Remove listener from listeners

Параметры:
  • listener – A listener class implements MapEventListener removing from listeners array

thaw

public void thaw()