> For AI agents: the complete documentation index is available at /core-sdk/map/web/llms.txt, the full documentation bundle is available at /core-sdk/map/web/llms-full.txt.

# Switch Venue, Building, or Floor

## Change Indoor Selected States

Three functions provided to change indoor map selected states: **selectVenueById()**, **selectBuildingById()**, **selectFloorById()** and **selectSharedFloorById()**.

- **selectVenueById(venueId, \{dragPan?, animate?, fitBounds?}?)**: Locate indoor by selecting venue, displays the venue's history/default\_displayed/first building of building\_ids.
  Then select the historical visited floor or default\_displayed\_floor or the floor which ordinal equals 0 of the displayed building.
  With **\{dragPan: true}/\{dragPan: false}** to enable/disable map panning, "dragPan" is true by default. **'venueId' can be 'null', then map will exit indoors**;
  With **\{animate: true}/\{animate: false}** to enable/disable map panning with animation, default setting is `animate: true`.
  And **\{fitBounds: true}/\{fitBounds: false}** to enable/disable the map view fit the selecting venue bounds.
- **selectBuildingById(buildingId, \{dragPan?, animate?, fitBounds?}?)**: Locate indoor by selecting building, displays the specified building.
  Select the historical visited floor or default\_displayed\_floor or the floor which ordinal equals 0.
- **selectFloorById(floorId, \{dragPan?, animate?, fitBounds?}?)**: Locate indoor by selecting floor, displays the specified floor\[and the building, venue it belongs to].
- **selectSharedFloorById(sharedFloorId, \{dragPan?, animate?, fitBounds?}?)**: Locate indoor by selecting shared floor, displays the specified sharedFloor\[and venue it belongs to].
  **Use Tips**: **Just choose one of the methods to call based on your scene requirements.**

```js
// mapxus load map listener
map.renderComplete(function() {
  // map.selectVenueById(venueId);
  // map.selectBuildingById(buildingId);
  // map.selectFloorById(floorId);
  // map.selectSharedFloorById(sharedFloorId);
});
```
