Loading...
Searching...
No Matches
Sublocation Class Referenceabstract

Class is used for storing sublocation parameters: identifier, name, width, heigth, etc. More...

Inherits Finalizable.

Public Member Functions

LocationPoint globalToLocal (GlobalPoint globalPoint)
 
GlobalPoint localToGlobal (LocationPoint localPoint)
 Method is used for converting the local sublocation coordinates to the global geographic coordinates (latitude and longitude) using the geographic binding of the sublocation.
 
Graph getGraph (String tag)
 Method is used to obtain graph (within the current sublocation) with the specified identifier or null if no such graph.
 
Venue getVenueById (int id)
 Method returns the venue (within the current sublocation) with the specified identifier or null if no such venue exists.
 
Zone getZoneById (int id)
 Method returns the zone (within the current sublocation) with the specified identifier or null if no such zone exists.
 

Public Attributes

int get id
 sublocation's identifier.
 
int get location
 location's identifier to which the sublocation belongs.
 
String get name
 sublocation's name.
 
double get width
 sublocation's width in meters.
 
double get height
 sublocation's height in meters.
 
double get altitude
 sublocation's altitude in meters if specified.
 
double get azimuth
 sublocation's azimuth in degrees clockwise.
 
GlobalPoint get originPoint
 sublocation's center point in WGS84 coordinates GlobalPoint.
 
String get levelId
 sublocation's levelId.
 
String get externalId
 sublocation's externalId.
 
List< Beacon > get beacons
 List of beacons, attached to this sublocation Beacon.
 
List< Eddystone > get eddystones
 List of eddystones, attached to this sublocation Eddystone.
 
List< Wifi > get wifis
 List of wifis, attached to this sublocation Wifi.
 
List< Venue > get venues
 List of venues, attached to this sublocation Venue.
 
List< Zone > get zones
 List of zones, attached to this sublocation Zone.
 

Detailed Description

Class is used for storing sublocation parameters: identifier, name, width, heigth, etc.

The list of sublocations for the current location can be obtained from Location class using public method getSublocations.

Referenced from Location.

Definition at line 30 of file sublocation.dart.

Member Function Documentation

◆ getGraph()

Graph Sublocation.getGraph ( String tag)

Method is used to obtain graph (within the current sublocation) with the specified identifier or null if no such graph.

Parameters
taggraph tag.
Returns
found graph or null Graph.

Dart code snippet:

// Get graph
Graph? graph = sublocation.getGraph();
if (graph != null) {
demonstrateGraphUsage(graph);
}

◆ getVenueById()

Venue Sublocation.getVenueById ( int id)

Method returns the venue (within the current sublocation) with the specified identifier or null if no such venue exists.

Parameters
idvenue unique identifier.
Returns
found venue object or null Venue.

Dart code snippet:

// Get venue by ID
if (venues.isNotEmpty) {
Venue? venueById = sublocation.getVenueById(venues.first.getId());
if (venueById != null) {
print('Found venue by ID: ${venueById.getId()}');
demonstrateVenueUsage(venueById);
}
}

◆ getZoneById()

Zone Sublocation.getZoneById ( int id)

Method returns the zone (within the current sublocation) with the specified identifier or null if no such zone exists.

Parameters
idzone unique identifier.
Returns
found zone object or null Zone.

Dart code snippet:

// Get zone by ID
if (zones.isNotEmpty) {
Zone? zoneById = sublocation.getZoneById(zones.first.getId());
if (zoneById != null) {
print('Found zone by ID: ${zoneById.getId()}');
demonstrateZoneUsage(zoneById);
}
}

◆ globalToLocal()

LocationPoint Sublocation.globalToLocal ( GlobalPoint globalPoint)

Method is used for converting the global geographic coordinates (latitude and longitude) to the local sublocation coordinates (x and y) using the geographic binding of the sublocation

Parameters
globalPointpoint in WGS84 coordinates GlobalPoint
Returns
point in metrics coordinates LocationPoint.

Dart code snippet:

// Convert global coordinates to local coordinates
GlobalPoint globalPoint = GlobalPoint(55.7558, 37.6176); // Moscow coordinates
LocationPoint localPoint = sublocation.globalToLocal(globalPoint);
print('Global point ${globalPoint.getLat()}, ${globalPoint.getLon()} converted to local: ${localPoint.getX()}, ${localPoint.getY()}');

◆ localToGlobal()

GlobalPoint Sublocation.localToGlobal ( LocationPoint localPoint)

Method is used for converting the local sublocation coordinates to the global geographic coordinates (latitude and longitude) using the geographic binding of the sublocation.

Parameters
localPointpoint in metrics coordinates LocationPoint
Returns
point in WGS84 coordinates GlobalPoint.

Dart code snippet:

// Convert local coordinates to global coordinates
LocationPoint localPoint2 = LocationPoint(100.0, 200.0);
GlobalPoint globalPoint2 = sublocation.localToGlobal(localPoint2);
print('Local point ${localPoint2.getX()}, ${localPoint2.getY()} converted to global: ${globalPoint2.getLat()}, ${globalPoint2.getLon()}');

Member Data Documentation

◆ altitude

double get Sublocation.altitude

sublocation's altitude in meters if specified.

Dart code snippet:

// Get sublocation altitude in meters
double? altitude = sublocation.getAltitude();
if (altitude != null) {
print('Sublocation altitude: $altitude meters');
}

Definition at line 169 of file sublocation.dart.

◆ azimuth

double get Sublocation.azimuth

sublocation's azimuth in degrees clockwise.

Dart code snippet:

// Get sublocation azimuth in degrees
double azimuth = sublocation.getAzimuth();
print('Sublocation azimuth: $azimuth degrees');

Definition at line 178 of file sublocation.dart.

◆ beacons

List<Beacon> get Sublocation.beacons

List of beacons, attached to this sublocation Beacon.

Dart code snippet:

// Get beacons
List<Beacon> beacons = sublocation.getBeacons();
print('Number of beacons: ${beacons.length}');

Definition at line 214 of file sublocation.dart.

◆ eddystones

List<Eddystone> get Sublocation.eddystones

List of eddystones, attached to this sublocation Eddystone.

Dart code snippet:

// Get Eddystone beacons
List<Eddystone> eddystones = sublocation.getEddystones();
print('Number of Eddystone beacons: ${eddystones.length}');

Definition at line 223 of file sublocation.dart.

◆ externalId

String get Sublocation.externalId

sublocation's externalId.

Dart code snippet:

// Get sublocation external ID
String externalId = sublocation.getExternalId();
print('Sublocation external ID: $externalId');

Definition at line 205 of file sublocation.dart.

◆ height

double get Sublocation.height

sublocation's height in meters.

Dart code snippet:

// Get sublocation height in meters
double height = sublocation.getHeight();
print('Sublocation height: $height meters');

Definition at line 160 of file sublocation.dart.

◆ id

int get Sublocation.id

sublocation's identifier.

Dart code snippet:

// Get sublocation ID
int sublocationId = sublocation.getId();
print('Sublocation ID: $sublocationId');

Definition at line 124 of file sublocation.dart.

◆ levelId

String get Sublocation.levelId

sublocation's levelId.

Dart code snippet:

// Get sublocation level ID
String levelId = sublocation.getLevelId();
print('Sublocation level ID: $levelId');

Definition at line 196 of file sublocation.dart.

◆ location

int get Sublocation.location

location's identifier to which the sublocation belongs.

Dart code snippet:

// Get location ID
int locationId = sublocation.getLocation();
print('Sublocation location ID: $locationId');

Definition at line 133 of file sublocation.dart.

◆ name

String get Sublocation.name

sublocation's name.

Dart code snippet:

// Get sublocation name
String? sublocationName = sublocation.getName();
print('Sublocation name: $sublocationName');

Definition at line 142 of file sublocation.dart.

◆ originPoint

GlobalPoint get Sublocation.originPoint

sublocation's center point in WGS84 coordinates GlobalPoint.

Dart code snippet:

// Get sublocation origin point in WGS84 coordinates
GlobalPoint originPoint = sublocation.getOriginPoint();
print('Sublocation origin point: ${originPoint.getLat()}, ${originPoint.getLon()}');

Definition at line 187 of file sublocation.dart.

◆ venues

List<Venue> get Sublocation.venues

List of venues, attached to this sublocation Venue.

Dart code snippet:

// Get venues
List<Venue> venues = sublocation.getVenues();
print('Number of venues: ${venues.length}');

Definition at line 246 of file sublocation.dart.

◆ width

double get Sublocation.width

sublocation's width in meters.

Dart code snippet:

// Get sublocation width in meters
double width = sublocation.getWidth();
print('Sublocation width: $width meters');

Definition at line 151 of file sublocation.dart.

◆ wifis

List<Wifi> get Sublocation.wifis

List of wifis, attached to this sublocation Wifi.

Dart code snippet:

// Get WiFi access points
List<Wifi> wifis = sublocation.getWifis();
print('Number of WiFi access points: ${wifis.length}');

Definition at line 232 of file sublocation.dart.

◆ zones

List<Zone> get Sublocation.zones

List of zones, attached to this sublocation Zone.

Dart code snippet:

// Get zones
List<Zone> zones = sublocation.getZones();
print('Number of zones: ${zones.length}');

Definition at line 255 of file sublocation.dart.


The documentation for this class was generated from the following file: