public static interface

MapApi.DataSources

com.mapsted.map.MapApi.DataSources
Known Indirect Subclasses

Class Overview

Access/manage map-related data sources and current selections

Summary

Public Methods
abstract void addMapSelectionChangeListener(MapSelectionChangeListener mapSelectionChangeListener)
Be notified of map selection changes
abstract void deselectBuilding()
Deselects the current building (property remains selected)
abstract void deselectEntity()
Deselects entity if any selected
abstract void enableAutomaticClickProcessing(boolean enable)
enable/disable automated click processing
abstract MapOverlayRepository getMapOverlayRepo()
Get access to the Map Overlay Repository
abstract Entity getSelectedEntity()
Gets the selected entity if any
abstract SelectedLocation getSelectedLocation()
Call this function to get the selected property/building location.
abstract String[] getSelectedLocationName()
Gets SelectedLocation name
abstract int getSelectedPropertyId()
Get the currently selected property (if one is selected)
abstract boolean isAutomaticClickProcessingEnabled()
Check whether or not automatic click processing is enabled
abstract boolean isBuildingPlotted(int buildingId)
Check whether or not a building is plotted
abstract boolean isPropertyPlotted(int property)
Check whether or not a property is plotted
abstract void plotBuilding(int buildingId, MapApi.PlotListener listener)
Plotting a building on the map (without selecting it)
abstract void plotProperty(int propertyId, MapApi.PropertyPlotListener listener)
Plotting a property on the map (without selecting it)
abstract boolean removeBuildingFromMap(int buildingId, boolean force)
Remove building from map.
abstract void removeMapSelectionChangeListener(MapSelectionChangeListener mapSelectionChangeListener)
Unsubscribe from map selection change events
abstract void removePropertyFromMap(int propertyId)
Call this function if you want to remove the property drawings from the map.
abstract void removeSelectEntityPin()
Remove selected entity pin from map
abstract void selectBuildingAndDrawIfNeeded(int buildingId, MapApi.PlotListener listener)
Select a specific building and plot it
abstract void selectEntity(Entity entity, Consumer<Boolean> onComplete)
Call this function to select an entity.
abstract void selectPropertyAndDrawIfNeeded(int propertyId, MapApi.PropertyPlotListener listener)
Call this function to change the current selected property corresponding to a new selected property id.
abstract void setSelectedBuilding(int buildingId, Consumer<Boolean> onComplete)
Selects the given building id
abstract void startPropertyDownload(Context context, int propertyId, PropertyDownloadManager.Listener listener)
Starts a property download.
abstract boolean switchFloor(int targetBuildingId, int targetFloorId)
Call this function to perform a floor switch.

Public Methods

public abstract void addMapSelectionChangeListener (MapSelectionChangeListener mapSelectionChangeListener)

Be notified of map selection changes

Parameters
mapSelectionChangeListener listener to be called

public abstract void deselectBuilding ()

Deselects the current building (property remains selected)

public abstract void deselectEntity ()

Deselects entity if any selected

public abstract void enableAutomaticClickProcessing (boolean enable)

enable/disable automated click processing

Parameters
enable whether to enable to disable

public abstract MapOverlayRepository getMapOverlayRepo ()

Get access to the Map Overlay Repository

Returns
  • the Map Overlay repository

public abstract Entity getSelectedEntity ()

Gets the selected entity if any

Returns
  • Entity or null

public abstract SelectedLocation getSelectedLocation ()

Call this function to get the selected property/building location.

Returns
  • Selection location contains property and/or building that the user has selected.

public abstract String[] getSelectedLocationName ()

Gets SelectedLocation name

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

public abstract int getSelectedPropertyId ()

Get the currently selected property (if one is selected)

Returns
  • the currently selected property

public abstract boolean isAutomaticClickProcessingEnabled ()

Check whether or not automatic click processing is enabled

Returns
  • whether or not it is enabled

public abstract boolean isBuildingPlotted (int buildingId)

Check whether or not a building is plotted

Parameters
buildingId the building
Returns
  • whether or not it's plotted

public abstract boolean isPropertyPlotted (int property)

Check whether or not a property is plotted

Parameters
property the property
Returns
  • whether or not it's plotted

public abstract void plotBuilding (int buildingId, MapApi.PlotListener listener)

Plotting a building on the map (without selecting it)

Parameters
buildingId building to plot
listener callback listener

public abstract void plotProperty (int propertyId, MapApi.PropertyPlotListener listener)

Plotting a property on the map (without selecting it)

Parameters
propertyId property to plot
listener callback listener

public abstract boolean removeBuildingFromMap (int buildingId, boolean force)

Remove building from map. Note that if force is false, and building is involved in routing or currently in use, then this operation may fail

Parameters
buildingId building to remove
force whether or not to force the removal
Returns
  • whether or not successful

public abstract void removeMapSelectionChangeListener (MapSelectionChangeListener mapSelectionChangeListener)

Unsubscribe from map selection change events

Parameters
mapSelectionChangeListener current listener to unsubscribe

public abstract 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 abstract void removeSelectEntityPin ()

Remove selected entity pin from map

public abstract void selectBuildingAndDrawIfNeeded (int buildingId, MapApi.PlotListener listener)

Select a specific building and plot it

Parameters
buildingId the building
listener callback when complete

public abstract void selectEntity (Entity entity, Consumer<Boolean> onComplete)

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

Parameters
entity is a Entity. It is entities on the map.
onComplete callback for wether or not selection was successful

public abstract void selectPropertyAndDrawIfNeeded (int propertyId, MapApi.PropertyPlotListener listener)

Call this function to change 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
propertyId The new selected property id for drawing if possible.
listener The listener is notified when selected map data events occur.

public abstract void setSelectedBuilding (int buildingId, Consumer<Boolean> onComplete)

Selects the given building id

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

public abstract 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 abstract boolean 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.
Returns
  • Whether or not switch was successful