VenueMap (API Reference)
Class VenueMap
Connects a map with venues. When the VenueMap is started,
venues can be seen on the map as interactive models. The user can switch drawings and levels,
change a visual style of geometries and related labels inside the venue etc.
After constructing the VenueMap, listeners
for relevant events should be added to the object. VenueMap is an add-on to
the base map functionality with its own content loading and cache. For this reason, in certain
situations there may be a small delay before the venue is visible.
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(VenueDrawingSelectionListener listener) Adds a drawing selection listener.voidadd(VenueInfoListListener listener) Adds a listener to handle the completion of the asynchronous venue info list retrieval.voidadd(VenueLevelSelectionListener listener) Adds a level selection listener.voidadd(VenueLifecycleListener listener) Adds a venue lifecycle listener.voidadd(VenueMapLifecycleListener listener) Adds a venue map lifecycle listener.voidadd(VenueSelectionListener listener) Adds a venue selection listener.voidaddVenueAsync(int venueId) voidaddVenueAsync(int venueId, VenueLoadErrorCallback callback) voidaddVenueAsync(String venueIdentifier) voidaddVenueAsync(String venueIdentifier, VenueLoadErrorCallback callback) booleanAttempts to cancel venue loading and selection that may currently be in progress.getCrosswalk(GeoCoordinates position) Tries to find aCrosswalkat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.getGeometry(GeoCoordinates position) Tries to find aVenueGeometryat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.Gets the currently selectedVenue.getTopology(GeoCoordinates position) Tries to find aVenueTopologyat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.getVenue(GeoCoordinates position) Tries to find aVenueat the specified geographic coordinates.The list ofVenueInfocontains venue id and name.getVenueInfoList(VenueLoadErrorCallback callback) The list ofVenueInfocontains venue id and name.voidThe list ofVenueInfocontains venue id and name.voidgetVenueInfoListAsync(VenueLoadErrorCallback callback) The list ofVenueInfocontains venue id and name.Gets the venue service.voidremove(VenueDrawingSelectionListener listener) Removes a drawing selection listener.voidremove(VenueInfoListListener listener) Removes a listener for the asynchronous venue info list retrieval.voidremove(VenueLevelSelectionListener listener) Removes a level selection listener.voidremove(VenueLifecycleListener listener) Removes a venue lifecycle listener.voidremove(VenueMapLifecycleListener listener) Removes a venue map lifecycle listener.voidremove(VenueSelectionListener listener) Removes a venue selection listener.voidremoveVenue(Venue venue) voidselectVenueAsync(int venueId) Downloads aVenueModelif needed and selects aVenue.voidselectVenueAsync(int venueId, VenueLoadErrorCallback callback) Downloads aVenueModelif needed and selects aVenue.voidselectVenueAsync(String venueIdentifier) Downloads aVenueModelif needed and selects aVenue.voidselectVenueAsync(String venueIdentifier, VenueLoadErrorCallback callback) Downloads aVenueModelif needed and selects aVenue.voidsetSelectedVenue(Venue value) Sets the selectedVenue.
-
Method Details
-
addVenueAsync
public void addVenueAsync(int venueId) Downloads and adds a
Venueto theVenueMap. Method will do nothing if the venue already exists on the venue map.- Parameters:
venueId-The ID of the venue to download and add.
-
addVenueAsync
Downloads and adds a
Venueto theVenueMap. Method will do nothing if the venue already exists on the venue map.- Parameters:
venueIdentifier-The ID of the venue to download and add.
-
addVenueAsync
Downloads and adds a
Venueto theVenueMap. Method will do nothing if the venue already exists on the venue map.- Parameters:
venueId-The ID of the venue to download and add.
callback-Callback to receives the error while venue load on the main thread.
-
addVenueAsync
public void addVenueAsync(@NonNull String venueIdentifier, @NonNull VenueLoadErrorCallback callback) Downloads and adds a
Venueto theVenueMap. Method will do nothing if the venue already exists on the venue map.- Parameters:
venueIdentifier-The ID of the venue to download and add.
callback-Callback to receives the error while venue load on the main thread.
-
removeVenue
- Parameters:
venue-The venue to remove.
-
selectVenueAsync
public void selectVenueAsync(int venueId) Downloads a
VenueModelif needed and selects aVenue.- Parameters:
venueId-The ID of the venue to download and select.
-
selectVenueAsync
Downloads a
VenueModelif needed and selects aVenue.- Parameters:
venueIdentifier-The ID of the venue to download and select.
-
selectVenueAsync
Downloads a
VenueModelif needed and selects aVenue.- Parameters:
venueId-The ID of the venue to download and select.
callback-Callback to receives the error while venue load on the main thread.
-
selectVenueAsync
public void selectVenueAsync(@NonNull String venueIdentifier, @NonNull VenueLoadErrorCallback callback) Downloads a
VenueModelif needed and selects aVenue.- Parameters:
venueIdentifier-The ID of the venue to download and select.
callback-Callback to receives the error while venue load on the main thread.
-
cancelVenueSelection
public boolean cancelVenueSelection()Attempts to cancel venue loading and selection that may currently be in progress.
- Returns:
Trueif a venue was about to load andfalseotherwise.
-
getVenue
Tries to find a
Venueat the specified geographic coordinates.- Parameters:
position-Geographic coordinates where a venue is located.
- Returns:
Venue or
nullif there is no venue at the specified geographic coordinates.
-
getGeometry
Tries to find a
VenueGeometryat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.- Parameters:
position-Geographic coordinates where the geometry is located.
- Returns:
Geometry or
nullif there is no geometry at the specified geographic coordinates.
-
add
Adds a venue lifecycle listener.
- Parameters:
listener-The listener to add.
-
remove
Removes a venue lifecycle listener.
- Parameters:
listener-The listener to remove.
-
add
Adds a venue map lifecycle listener.
- Parameters:
listener-The listener to add.
-
remove
Removes a venue map lifecycle listener.
- Parameters:
listener-The listener to remove.
-
add
Adds a venue selection listener.
- Parameters:
listener-The listener to add.
-
remove
Removes a venue selection listener.
- Parameters:
listener-The listener to remove.
-
add
Adds a drawing selection listener.
- Parameters:
listener-The listener to add.
-
remove
Removes a drawing selection listener.
- Parameters:
listener-The listener to remove.
-
add
Adds a level selection listener.
- Parameters:
listener-The listener to add.
-
remove
Removes a level selection listener.
- Parameters:
listener-The listener to remove.
-
add
Adds a listener to handle the completion of the asynchronous venue info list retrieval.
- Parameters:
listener-The listener to add.
-
remove
Removes a listener for the asynchronous venue info list retrieval.
- Parameters:
listener-The listener to remove.
-
getVenueInfoList
The list of
VenueInfocontains venue id and name.- Returns:
returns the list of object of
VenueInfo.
-
getVenueInfoList
The list of
VenueInfocontains venue id and name.- Parameters:
callback-Callback to receives the error while venue load on the main thread.
- Returns:
returns the list of object of
VenueInfo.
-
getVenueInfoListAsync
public void getVenueInfoListAsync() -
getVenueInfoListAsync
- Parameters:
callback-Callback to receive the list of venue info if successful.
-
getTopology
Tries to find a
VenueTopologyat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.- Parameters:
position-Geographic coordinates where the topology is located.
- Returns:
Topology or
nullif there is no topology at the specified geographic coordinates.
-
getCrosswalk
Tries to find a
Crosswalkat the specified geographic coordinates in the selectedVenuein the currently selectedVenueLevel.- Parameters:
position-Geographic coordinates where the crosswalk is located.
- Returns:
Crosswalk or
nullif there is no crosswalk at the specified geographic coordinates.
-
getVenueService
Gets the venue service.
It can be used to search and get the
VenueModelobjects.- Returns:
The
VenueServiceobject.
-
getSelectedVenue
Gets the currently selected
Venue.Use
nullto deselect the venue.- Returns:
The selected venue or
nullif no venue is selected.
-
setSelectedVenue
Sets the selected
Venue.Use
nullto deselect the venue.- Parameters:
value-The selected venue or
nullif no venue is selected.
-