Skip to main content
Version: 6.0

Spaces

Using Mappedin SDK for iOS 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) { [weak self] (result: Result<[Space], Error>) in
guard let self = self else { return }
if case .success(let spaces) = result {
spaces.forEach { space in
self.mapView.updateState(target: space, state: ["interactive": true]) { _ in }
}
}
}

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(
target: Doors.interior.rawValue,
state: [
"visible": true,
"color": "#5C4033",
"opacity": 0.6
]
) { _ in }

// Make exterior doors visible and black.
mapView.updateState(
target: Doors.exterior.rawValue,
state: [
"visible": true,
"color": "black",
"opacity": 0.6
]
) { _ in }

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

Visible Doors