Class VenueMap

java.lang.Object
com.here.NativeBase
com.here.sdk.venue.control.VenueMap

public final class VenueMap extends NativeBase

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 Details

    • addVenueAsync

      public void addVenueAsync(int venueId)

      Downloads and adds a Venue to the VenueMap. 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

      public void addVenueAsync(@NonNull String venueIdentifier)

      Downloads and adds a Venue to the VenueMap. 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

      public void addVenueAsync(int venueId, @NonNull VenueLoadErrorCallback callback)

      Downloads and adds a Venue to the VenueMap. 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 Venue to the VenueMap. 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

      public void removeVenue(@NonNull Venue venue)

      Removes a Venue from the VenueMap.

      Parameters:
      venue -

      The venue to remove.

    • selectVenueAsync

      public void selectVenueAsync(int venueId)

      Downloads a VenueModel if needed and selects a Venue.

      Parameters:
      venueId -

      The ID of the venue to download and select.

    • selectVenueAsync

      public void selectVenueAsync(@NonNull String venueIdentifier)

      Downloads a VenueModel if needed and selects a Venue.

      Parameters:
      venueIdentifier -

      The ID of the venue to download and select.

    • selectVenueAsync

      public void selectVenueAsync(int venueId, @NonNull VenueLoadErrorCallback callback)

      Downloads a VenueModel if needed and selects a Venue.

      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 VenueModel if needed and selects a Venue.

      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:

      True if a venue was about to load and false otherwise.

    • getVenue

      @Nullable public Venue getVenue(@NonNull GeoCoordinates position)

      Tries to find a Venue at the specified geographic coordinates.

      Parameters:
      position -

      Geographic coordinates where a venue is located.

      Returns:

      Venue or null if there is no venue at the specified geographic coordinates.

    • getGeometry

      @Nullable public VenueGeometry getGeometry(@NonNull GeoCoordinates position)

      Tries to find a VenueGeometry at the specified geographic coordinates in the selected Venue in the currently selected VenueLevel.

      Parameters:
      position -

      Geographic coordinates where the geometry is located.

      Returns:

      Geometry or null if there is no geometry at the specified geographic coordinates.

    • add

      public void add(@NonNull VenueLifecycleListener listener)

      Adds a venue lifecycle listener.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueLifecycleListener listener)

      Removes a venue lifecycle listener.

      Parameters:
      listener -

      The listener to remove.

    • add

      public void add(@NonNull VenueMapLifecycleListener listener)

      Adds a venue map lifecycle listener.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueMapLifecycleListener listener)

      Removes a venue map lifecycle listener.

      Parameters:
      listener -

      The listener to remove.

    • add

      public void add(@NonNull VenueSelectionListener listener)

      Adds a venue selection listener.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueSelectionListener listener)

      Removes a venue selection listener.

      Parameters:
      listener -

      The listener to remove.

    • add

      public void add(@NonNull VenueDrawingSelectionListener listener)

      Adds a drawing selection listener.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueDrawingSelectionListener listener)

      Removes a drawing selection listener.

      Parameters:
      listener -

      The listener to remove.

    • add

      public void add(@NonNull VenueLevelSelectionListener listener)

      Adds a level selection listener.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueLevelSelectionListener listener)

      Removes a level selection listener.

      Parameters:
      listener -

      The listener to remove.

    • add

      public void add(@NonNull VenueInfoListListener listener)

      Adds a listener to handle the completion of the asynchronous venue info list retrieval.

      Parameters:
      listener -

      The listener to add.

    • remove

      public void remove(@NonNull VenueInfoListListener listener)

      Removes a listener for the asynchronous venue info list retrieval.

      Parameters:
      listener -

      The listener to remove.

    • getVenueInfoList

      @NonNull public List<VenueInfo> getVenueInfoList()

      The list of VenueInfo contains venue id and name.

      Returns:

      returns the list of object of VenueInfo.

    • getVenueInfoList

      @NonNull public List<VenueInfo> getVenueInfoList(@NonNull VenueLoadErrorCallback callback)

      The list of VenueInfo contains 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()

      The list of VenueInfo contains venue id and name. Downloads the list of VenueInfo asynchronously.

    • getVenueInfoListAsync

      public void getVenueInfoListAsync(@NonNull VenueLoadErrorCallback callback)

      The list of VenueInfo contains venue id and name. Downloads the list of VenueInfo asynchronously.

      Parameters:
      callback -

      Callback to receive the list of venue info if successful.

    • getTopology

      @Nullable public VenueTopology getTopology(@NonNull GeoCoordinates position)

      Tries to find a VenueTopology at the specified geographic coordinates in the selected Venue in the currently selected VenueLevel.

      Parameters:
      position -

      Geographic coordinates where the topology is located.

      Returns:

      Topology or null if there is no topology at the specified geographic coordinates.

    • getCrosswalk

      @Nullable public Crosswalk getCrosswalk(@NonNull GeoCoordinates position)

      Tries to find a Crosswalk at the specified geographic coordinates in the selected Venue in the currently selected VenueLevel.

      Parameters:
      position -

      Geographic coordinates where the crosswalk is located.

      Returns:

      Crosswalk or null if there is no crosswalk at the specified geographic coordinates.

    • getVenueService

      @NonNull public VenueService getVenueService()

      Gets the venue service.

      It can be used to search and get the VenueModel objects.

      Returns:

      The VenueService object.

    • getSelectedVenue

      @Nullable public Venue getSelectedVenue()

      Gets the currently selected Venue.

      Use null to deselect the venue.

      Returns:

      The selected venue or null if no venue is selected.

    • setSelectedVenue

      public void setSelectedVenue(@Nullable Venue value)

      Sets the selected Venue.

      Use null to deselect the venue.

      Parameters:
      value -

      The selected venue or null if no venue is selected.