public class

MapstedMapEventManager

extends Object
implements IMapstedMapEventListener IMapstedVectorElementListener IMapstedVectorTileClicked
java.lang.Object
   ↳ com.mapsted.map.events.MapstedMapEventManager

Class Overview

Manager class for implementing map events and map vector element events

Summary

Public Constructors
MapstedMapEventManager(MapApi mapApi)
Public Methods
boolean addMapClickListener(MapApi.MapClickListener listener)
Register a map click listener (e.g.
boolean addMapEventListener(MapApi.MapEventListener listener)
Register a map event listener (e.g.
void changeAutomatedClickProcessingState(boolean enable)
Control whether or not map listener will automatically handle click processing
boolean isAutomatedClickProcessing()
void onDestroy()
void onMapClicked(MapClickInfo mapClickInfo)
Called when the map is clicked
void onMapIdle()
Called when the map is idle
void onMapMoved()
Called when the map is moved
void onMapStable()
Called when the map is stable
synchronized boolean onVectorElementClicked(VectorElementClickInfo clickInfo)
Callback coming from VectorElementListener class
synchronized boolean onVectorTileClicked(VectorTileClickInfo clickInfo)
boolean removeMapClickListener(MapApi.MapClickListener listener)
Unregister a map click listener (e.g.
boolean removeMapEventListener(MapApi.MapEventListener listener)
Unregister a map event listener (e.g.
void setAllowNonSearchableEntitySelecting(boolean enable)
Control whether or not map listener allows the selection of non-searchable entities
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.mapsted.map.events.IMapstedMapEventListener
From interface com.mapsted.map.events.IMapstedVectorElementListener
From interface com.mapsted.map.events.IMapstedVectorTileClicked

Public Constructors

public MapstedMapEventManager (MapApi mapApi)

Public Methods

public boolean addMapClickListener (MapApi.MapClickListener listener)

Register a map click listener (e.g. single, double, dual, long) MapClickEvent

Parameters
listener the listener to register
Returns
  • whether or not successfully registered

public boolean addMapEventListener (MapApi.MapEventListener listener)

Register a map event listener (e.g. map move, map idle, map stable) MapEvent

Parameters
listener the listener to register
Returns
  • whether or not successfully registered

public void changeAutomatedClickProcessingState (boolean enable)

Control whether or not map listener will automatically handle click processing

Parameters
enable whether or not to allow

public boolean isAutomatedClickProcessing ()

public void onDestroy ()

public void onMapClicked (MapClickInfo mapClickInfo)

Called when the map is clicked

Parameters
mapClickInfo Object which consists of click type and click position

public void onMapIdle ()

Called when the map is idle

public void onMapMoved ()

Called when the map is moved

public void onMapStable ()

Called when the map is stable

public synchronized boolean onVectorElementClicked (VectorElementClickInfo clickInfo)

Callback coming from VectorElementListener class

Parameters
clickInfo Object of VectorElementClickInfo consisting of position and layer information
Returns
  • true if the click event is handled, false if it should continue searching

public synchronized boolean onVectorTileClicked (VectorTileClickInfo clickInfo)

public boolean removeMapClickListener (MapApi.MapClickListener listener)

Unregister a map click listener (e.g. single, double, dual, long) MapClickEvent

Parameters
listener the listener to unregister
Returns
  • whether or not successfully unregistered

public boolean removeMapEventListener (MapApi.MapEventListener listener)

Unregister a map event listener (e.g. map move, map idle, map stable) MapEvent

Parameters
listener the listener to unregister
Returns
  • whether or not successfully unregistered

public void setAllowNonSearchableEntitySelecting (boolean enable)

Control whether or not map listener allows the selection of non-searchable entities

Parameters
enable whether or not to allow