IndoorBuilding
Stay organized with collections
Save and categorize content based on your preferences.
Represents a building.
Two IndoorBuildings are .equal() if the physical building they represent is the same.
However, if a building's structural model changes, e.g., due to an update to Google's
building models, then an old IndoorBuilding object and a new IndoorBuilding object will be
.equal(), but might have different contents.
Public Method Summary
boolean |
|
int |
getActiveLevelIndex
() Gets the index in the list returned by getLevels()
of the level that is currently active in this building
(default if no active level was previously set).
|
int |
|
List
< IndoorLevel
> |
getLevels
() Gets the levels in the building.
|
int |
|
boolean |
isUnderground
() Returns true if the building is entirely underground.
|
Inherited Method Summary
From class java.lang.Object
Public Methods
public boolean
equals
( Object
other)
Returns
- true if both objects are the same object, that is, this == other.
public int
getActiveLevelIndex
()
Gets the index in the list returned by getLevels()
of the level that is currently active in this building (default if no active level was
previously set).
public int
getDefaultLevelIndex
()
Gets the index in the list returned by getLevels()
of the default level for this building.
Gets the levels in the building. While a level is usually enclosed by a single
building, a level might be enclosed by several buildings (e.g., a carpark level might
span multiple buildings). The levels are in 'display order' from top to bottom.
public boolean
isUnderground
()
Returns true if the building is entirely underground.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIndoorBuilding\u003c/code\u003e class in Google Maps Android API represents a building on a map, including its levels and whether it's underground.\u003c/p\u003e\n"],["\u003cp\u003eTwo \u003ccode\u003eIndoorBuilding\u003c/code\u003e objects are considered equal if they represent the same physical building, even if their internal data might differ due to updates.\u003c/p\u003e\n"],["\u003cp\u003eYou can access information about the building's levels, such as the active level, default level, and a list of all levels.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIndoorBuilding\u003c/code\u003e class provides methods for checking equality, getting level information, and determining if the building is underground.\u003c/p\u003e\n"]]],["The `IndoorBuilding` class represents a physical building, with equality determined by the building itself, despite potential model updates. Key actions include: checking if two `IndoorBuilding` objects are equal using `.equals()`; retrieving the index of the currently active level with `.getActiveLevelIndex()`; getting the default level's index via `.getDefaultLevelIndex()`; obtaining a list of levels using `.getLevels()`, which are ordered from top to bottom; and verifying if the building is entirely underground with `.isUnderground()`. A hashcode can be generated using `.hashCode()`.\n"],null,["# IndoorBuilding\n\npublic final class **IndoorBuilding** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nRepresents a building.\n\nTwo IndoorBuildings are .equal() if the physical building they represent is the same.\nHowever, if a building's structural model changes, e.g., due to an update to Google's\nbuilding models, then an old IndoorBuilding object and a new IndoorBuilding object will be\n.equal(), but might have different contents. \n\n### Public Method Summary\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) other) Tests if this [IndoorBuilding](/android/reference/com/google/android/gms/maps/model/IndoorBuilding) is equal to another. |\n| int | [getActiveLevelIndex](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getActiveLevelIndex())() Gets the index in the list returned by [getLevels()](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getLevels()) of the level that is currently active in this building (default if no active level was previously set). |\n| int | [getDefaultLevelIndex](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getDefaultLevelIndex())() Gets the index in the list returned by [getLevels()](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getLevels()) of the default level for this building. |\n| [List](//developer.android.com/reference/java/util/List.html)\\\u003c[IndoorLevel](/android/reference/com/google/android/gms/maps/model/IndoorLevel)\\\u003e | [getLevels](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getLevels())() Gets the levels in the building. |\n| int | [hashCode](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#hashCode())() |\n| boolean | [isUnderground](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#isUnderground())() Returns true if the building is entirely underground. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) other)\n\nTests if this [IndoorBuilding](/android/reference/com/google/android/gms/maps/model/IndoorBuilding)\nis equal to another. \n\n##### Parameters\n\n| other | an [Object](//developer.android.com/reference/java/lang/Object.html). |\n|-------|-----------------------------------------------------------------------|\n\n##### Returns\n\n- true if both objects are the same object, that is, this == other. \n\n#### public int **getActiveLevelIndex** ()\n\nGets the index in the list returned by [getLevels()](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getLevels())\nof the level that is currently active in this building (default if no active level was\npreviously set). \n\n#### public int **getDefaultLevelIndex** ()\n\nGets the index in the list returned by [getLevels()](/android/reference/com/google/android/gms/maps/model/IndoorBuilding#getLevels())\nof the default level for this building. \n\n#### public [List](//developer.android.com/reference/java/util/List.html)\\\u003c[IndoorLevel](/android/reference/com/google/android/gms/maps/model/IndoorLevel)\\\u003e\n**getLevels** ()\n\nGets the levels in the building. While a level is usually enclosed by a single\nbuilding, a level might be enclosed by several buildings (e.g., a carpark level might\nspan multiple buildings). The levels are in 'display order' from top to bottom. \n\n#### public int **hashCode** ()\n\n#### public boolean **isUnderground** ()\n\nReturns true if the building is entirely underground."]]