Skip to main content
Version: 6.0

Spaces

Using Mappedin SDK for Android with your own map requires a Pro license. Try a demo map for free or refer to the Pricing page for more information.

A Space represents an area enclosed by walls, such as a hall or room. Spaces can be Interactive and have Labels and Markers added to them. Spaces can also be customized with a color and texture.

Spaces Example

The example below loops through all spaces and makes them interactive.

Refer to the Textures & Colors (coming soon) section for more information on how to set the texture or color of a space.

// Set all spaces to be interactive so they can be clicked
mapView.mapData.getByType<Space>(MapDataType.SPACE) { result ->
result.onSuccess { spaces ->
spaces.forEach { space ->
mapView.updateState(space, mapOf("interactive" to true)) { }
}
}
}

Doors

By default, a Door is not visible and drawn as a gap in a wall. An app can set the visible property to true to make the door visible. Other properties of a door can also be set, such as color, texture, interactivity and more. Refer to DoorsState for the complete list of properties. Refer to the Textures & Colors (coming soon) section for more information on how to set the texture or color of a door.

Doors are grouped into DOORS.Interior and DOORS.Exterior doors, based on whether they are on an interior or exterior wall.

// Make interior doors visible and brown.
mapView.updateState(
Doors.INTERIOR.value,
mapOf(
"visible" to true,
"color" to "#5C4033",
"opacity" to 0.6,
),
) { }

// Make exterior doors visible and black.
mapView.updateState(
Doors.EXTERIOR.value,
mapOf(
"visible" to true,
"color" to "black",
"opacity" to 0.6,
),
) { }

The screenshot below shows brown interior and black exterior doors with labels added to depict the status of the door.

Visible Doors