1

Is there a way to programatically select a level in indoor maps using Google Maps Android SDK

Here is what we are trying to achieve:

  1. Android app lists different stores in a particular premises (for which indoor maps are available)
  2. Android app has a feature to locate a particular store on the MAP
  3. Android app to use Maps SDK to put a marker on that particular store and if that store happens to be on level 2 (non default level) choose level 2 programatically

Any help regarding this is appreciated !! Happy to provide any further information that may be required.

2 Answers2

1

You can't get a list of stores but you can programmatically select a floor of the building. Therefore first you have to zoom in to the position LatLgn pos where the building is.

map.moveCamera(pos, 18));

Afterwards you retrieve the focused building and select the level you want

IndoorBuilding building = map.getFocusedBuilding();
    if(building != null) {
        List<IndoorLevel> levels = building.getLevels();
        //active the level you want to display on the map
        levels.get(1).activate();
    }
Juri Adam
  • 569
  • 6
  • 21