public class

MapstedMapApi.DataSourcesImpl

extends Object
implements MapApi.DataSources
java.lang.Object
   ↳ com.mapsted.map.MapstedMapApi.DataSourcesImpl

Summary

Public Constructors
DataSourcesImpl(MapstedMapApi mapApi)
Public Methods
void addMapSelectionChangeListener(MapSelectionChangeListener mapSelectionChangeListener)
Be notified of map selection changes
void deselectBuilding()
Deselects the current building (property remains selected)
void deselectEntity()
Deselect all entities
void enableAutomaticClickProcessing(boolean enable)
enable/disable automated click processing
BuildingData getSelectedBuildingData()
Get current selected building data.
Entity getSelectedEntity()
Gets the selected entity if any
SelectedLocation getSelectedLocation()
Call this function to get selected building location.
String[] getSelectedLocationName()
Gets SelectedLocation name
int getSelectedPropertyId()
Get current selected property id.
boolean isAutomaticClickProcessingEnabled()
Check whether or not automatic click processing is enabled
boolean isBuildingPlotted(int buildingId)
void onDestroy()
void plotBuilding(int buildingId)
boolean removeBuildingFromMap(int buildingId, boolean force)
Call this function to remove a specific building on the map
void removeMapSelectionChangeListener(MapSelectionChangeListener mapSelectionChangeListener)
Unsubscribe from map selection change events
void removePropertyFromMap(int propertyId)
Call this function if you want to remove the property drawings from the map.
void removeSelectEntityPin()
void selectBuildingAndDrawIfNeeded(int selectedBuildingId, MapDataSelection.Listener buildingListener)
void selectEntity(Entity entity)
Call this function to select an entity.
void selectPropertyAndDrawIfNeeded(int selectedPropertyId, MapApi.SelectPropertyListener selectPropertyListener)
Call this function to changes the current selected property corresponding to a new selected property id.
void setSelectedBuilding(int buildingId, MapDataSelection.Listener listener)
Selects the given building id
void setSelectedBuilding(int buildingId)
Selects the given building id
void startPropertyDownload(Context context, int propertyId, PropertyDownloadManager.Listener listener)
Starts a property download.
void switchFloor(int targetBuildingId, int targetFloorId)
Call this function to perform a floor switch.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.mapsted.map.MapApi.DataSources

Public Constructors

public DataSourcesImpl (MapstedMapApi mapApi)

Public Methods

public void addMapSelectionChangeListener (MapSelectionChangeListener mapSelectionChangeListener)

Be notified of map selection changes

Parameters
mapSelectionChangeListener listener to be called

public void deselectBuilding ()

Deselects the current building (property remains selected)

public void deselectEntity ()

Deselect all entities

public void enableAutomaticClickProcessing (boolean enable)

enable/disable automated click processing

Parameters
enable whether to enable to disable

public BuildingData getSelectedBuildingData ()

Get current selected building data.

Returns
  • Return current selected building data. Return null if no building data selected.

public Entity getSelectedEntity ()

Gets the selected entity if any

Returns
  • Entity or null

public SelectedLocation getSelectedLocation ()

Call this function to get selected building location.

Returns
  • Selection location contains building id that user is selected.

public String[] getSelectedLocationName ()

Gets SelectedLocation name

Returns
  • Selected location's name in String or null if not found

public int getSelectedPropertyId ()

Get current selected property id.

Returns
  • Return current selected property id. Return null if no property selected.

public boolean isAutomaticClickProcessingEnabled ()

Check whether or not automatic click processing is enabled

Returns
  • whether or not it is enabled

public boolean isBuildingPlotted (int buildingId)

public void onDestroy ()

public void plotBuilding (int buildingId)

public boolean removeBuildingFromMap (int buildingId, boolean force)

Call this function to remove a specific building on the map

Parameters
buildingId building to remove from map
force if false, will not remove if user is at this building or a routing session that involves this building is ongoing.
Returns
  • result

public void removeMapSelectionChangeListener (MapSelectionChangeListener mapSelectionChangeListener)

Unsubscribe from map selection change events

Parameters
mapSelectionChangeListener current listener to unsubscribe

public void removePropertyFromMap (int propertyId)

Call this function if you want to remove the property drawings from the map. It will remove property data from core library.

Parameters
propertyId Property id corresponding to the property you want to remove.

public void removeSelectEntityPin ()

public void selectBuildingAndDrawIfNeeded (int selectedBuildingId, MapDataSelection.Listener buildingListener)

public void selectEntity (Entity entity)

Call this function to select an entity. This will store the selected entity.

Parameters
entity is a Entity. It is entities on the map.

public void selectPropertyAndDrawIfNeeded (int selectedPropertyId, MapApi.SelectPropertyListener selectPropertyListener)

Call this function to changes the current selected property corresponding to a new selected property id. The map will be updated and re-draw the new selected property. Note that you will have to center the map to property yourself if needed.

Parameters
selectedPropertyId The new selected property id for drawing if possible.
selectPropertyListener The listener is notified when complete.

public void setSelectedBuilding (int buildingId, MapDataSelection.Listener listener)

Selects the given building id

Parameters
buildingId buildingId to be selected.
listener callback with updates.

public void setSelectedBuilding (int buildingId)

Selects the given building id

Parameters
buildingId buildingId to be selected.

public void startPropertyDownload (Context context, int propertyId, PropertyDownloadManager.Listener listener)

Starts a property download.

Parameters
context Application context
propertyId propertyId of property to download
listener Listener to track the download progress

public void switchFloor (int targetBuildingId, int targetFloorId)

Call this function to perform a floor switch.

Parameters
targetBuildingId the building id
targetFloorId The floor id for the floor to display on the map.