Venue (API Reference)
Class Venue
Controls the VenueModel inside the VenueMap object.
The venue controls the selection of the VenueDrawing and the VenueLevel
of the VenueModel. It provides the possibility to customize styles for the VenueGeometry.
Objects of this class can only be created using methods
VenueMap.addVenueAsync(String, VenueLoadErrorCallback) and VenueMap.selectVenueAsync(String, VenueLoadErrorCallback).
-
Method Summary
Modifier and TypeMethodDescriptionGets the currently selectedVenueDrawingof theVenueModel.Gets the currently selectedVenueLevelfrom the selectedVenueDrawing.intGets the index of the currently selectedVenueLevelin the level array of the relatedVenueDrawing.intGets the Z index of the currently selectedVenueLevel.Gets theVenueModelcontrolled by this object.Gets theVenueStyleassociated with theVenueModelcontrolled by this object.booleanGets the current status of topology visibility.voidsetCustomStyle(List<VenueGeometry> geometries, VenueGeometryStyle style, VenueLabelStyle labelStyle) Sets a custom style for geometries and related labels.voidsetCustomStyle(List<VenueTopology> topologies, VenueGeometryStyle style) Sets a custom style for topologies.voidsetCustomStyleToCrosswalk(List<Crosswalk> crosswalks, VenueGeometryStyle style) Sets a custom style for crosswalk.voidsetSelectedDrawing(VenueDrawing value) Sets the selectedVenueDrawing.voidsetSelectedLevel(VenueLevel value) Sets the selectedVenueLevelfrom the currently selectedVenueDrawing.voidsetSelectedLevelIndex(int value) Sets theVenueLevelwith the specified index from the level array of theVenueDrawingas selected.voidsetSelectedLevelZIndex(int value) Sets theVenueLevelwith the specified Z index as selected.voidsetTopologyVisible(boolean value) Sets the topology visibility.
-
Method Details
-
setCustomStyle
public void setCustomStyle(@NonNull List<VenueGeometry> geometries, @Nullable VenueGeometryStyle style, @Nullable VenueLabelStyle labelStyle) Sets a custom style for geometries and related labels.
- Parameters:
geometries-The list of geometries to apply the new style.
style-The style for geometries, or
nullto reset the style to default.labelStyle-The style for geometry labels, or
nullto reset the label style to default.
-
setCustomStyle
public void setCustomStyle(@NonNull List<VenueTopology> topologies, @Nullable VenueGeometryStyle style) Sets a custom style for topologies.
- Parameters:
topologies-The list of topologies to apply the new style.
style-The style for geometries, or
nullto reset the style to default.
-
setCustomStyleToCrosswalk
public void setCustomStyleToCrosswalk(@NonNull List<Crosswalk> crosswalks, @Nullable VenueGeometryStyle style) Sets a custom style for crosswalk.
- Parameters:
crosswalks-The list of crosswalk to apply the new style.
style-The style for geometries, or
nullto reset the style to default.
-
getVenueModel
Gets the
VenueModelcontrolled by this object.It can be used to get the
VenueModelbelonging to this object, like a building or a complex of buildings.- Returns:
The
VenueModelcontrolled by this object.
-
getVenueStyle
Gets the
VenueStyleassociated with theVenueModelcontrolled by this object.It can be used to get the style of the venue. Contains the information about the geometry and label styles available for the venue.
- Returns:
The
VenueStyleassociated with theVenueModelcontrolled by this object.
-
getSelectedDrawing
Gets the currently selected
VenueDrawingof theVenueModel.Only the selected drawing will be visible as active on the map. All others will be hidden or displayed without details, depending on the implementation of the renderer.
- Returns:
The selected drawing.
-
setSelectedDrawing
Sets the selected
VenueDrawing.Only the selected drawing will be visible as active on the map. All others will be hidden or displayed without details, depending on the implementation of the renderer.
- Parameters:
value-The selected drawing.
-
getSelectedLevel
Gets the currently selected
VenueLevelfrom the selectedVenueDrawing.Only the selected level will be visible as active on the map. All others will be hidden or displayed without details, depending on a renderer implementation. If the level doesn't belong to the currently selected drawing, it can not be selected.
- Returns:
The selected level.
-
setSelectedLevel
Sets the selected
VenueLevelfrom the currently selectedVenueDrawing.Only the selected level will be visible as active on the map. All others will be hidden or displayed without details, depending on a renderer implementation. If the level doesn't belong to the currently selected drawing, it can not be selected.
- Parameters:
value-The selected level.
-
getSelectedLevelZIndex
public int getSelectedLevelZIndex()Gets the Z index of the currently selected
VenueLevel.Z index 0 represents the ground level, negative values represent underground levels, positive values - levels above the ground. Z index can also be taken from
VenueLevel.getZIndex().- Returns:
The Z index value of the
VenueLevelselected.
-
setSelectedLevelZIndex
public void setSelectedLevelZIndex(int value) Sets the
VenueLevelwith the specified Z index as selected.Z index 0 represents the ground level, negative values represent underground levels, positive values - levels above the ground. Z index can also be taken from
VenueLevel.getZIndex().- Parameters:
value-The Z index value of the
VenueLevelselected.
-
getSelectedLevelIndex
public int getSelectedLevelIndex()Gets the index of the currently selected
VenueLevelin the level array of the relatedVenueDrawing. The level array can be taken fromVenueDrawing.getLevels().Unlike the Z index, it can't have a negative value.
- Returns:
The index of the
VenueLevelselected from the level array of theVenueDrawing.
-
setSelectedLevelIndex
public void setSelectedLevelIndex(int value) Sets the
VenueLevelwith the specified index from the level array of theVenueDrawingas selected.Unlike the Z index, it can't have a negative value.
- Parameters:
value-The index of the
VenueLevelselected from the level array of theVenueDrawing.
-
isTopologyVisible
public boolean isTopologyVisible()Gets the current status of topology visibility.
It can be used to check the status of topology visibility.
- Returns:
Returns true if topology is visible.
-
setTopologyVisible
public void setTopologyVisible(boolean value) Sets the topology visibility.
It can be used to check the status of topology visibility.
- Parameters:
value-Returns true if topology is visible.
-