@model LocationDetailViewModel @{ var map = Model.Spatial?.Map; var floor = Model.Spatial?.Floor; var plan = Model.Spatial?.FloorPlan; string Caption(int id) => id == Model.Location.LocationID ? Model.Location.LocationName : $"Containing location: {Model.Locations.FirstOrDefault(item => item.LocationID == id)?.LocationName}"; }

Spatial awareness

@if (map is not null) {

@map.Name

@Caption(map.LocationID)

Open map in Maps
} @if (floor is not null && plan is not null) {

@floor.Name

@Caption(floor.LocationID)@(floor.FloorPlanBlockID.HasValue ? "" : " ยท No room is linked to this location.")

Open plan in Floor Plans

} @if (map is null && floor is null) {

No placed map feature or floor plan is linked to this location or its containing locations.

}
Browse Maps Browse Floor Plans