selectedSiteId property
The ID of the selected site, or null if no site is selected.
Set this to an existing site ID to select that site. Set it to null to
clear the site and any selected facility and level. Setting a non-null ID
throws an ArcGISException if the FloorManager is not loaded or the ID does not exist.
Implementation
String? get selectedSiteId => _selectedSite?.siteId;
Implementation
set selectedSiteId(String? selectedSiteId) {
if (_floorManager?.loadStatus != .loaded) {
throw Exception('FloorManager does not exist or failed to load.');
}
if (selectedSiteId == null) {
_selectSite(null);
} else {
final selectedSite = _floorManager!.sites.firstWhere(
(site) => site.siteId == selectedSiteId,
orElse: () =>
throw Exception('Site with ID: $selectedSiteId cannot be found.'),
);
_selectSite(selectedSite);
}
}