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.
boolean isAutomatedClickProcessing()
void onDestroy()
void onMapClicked(MapClickInfo mapClickInfo)
Base map has been 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
boolean onVectorElementClicked(VectorElementClickInfo clickInfo)
Vector element on map has been clicked.
boolean onVectorTileClicked(VectorTileClickInfo clickInfo)
Vector Tile element on map has been clicked (carto-css) Vector Tiles are elements like entites on the map drawn via carto-css
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 boolean isAutomatedClickProcessing ()

public void onDestroy ()

public void onMapClicked (MapClickInfo mapClickInfo)

Base map has been 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 boolean onVectorElementClicked (VectorElementClickInfo clickInfo)

Vector element on map has been clicked. Vector Elements are items like Icons, MapOverlays, etc.

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 boolean onVectorTileClicked (VectorTileClickInfo clickInfo)

Vector Tile element on map has been clicked (carto-css) Vector Tiles are elements like entites on the map drawn via carto-css

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