Loading...
Searching...
No Matches
Location Class Referenceabstract

Class is used for storing location parameters: identifier, version, name, a list of sublocations, etc. More...

Inherits Finalizable.

Public Member Functions

ElevationGraph getElevationGraph (String tag)
 Method returns location elevation graph ElevationGraph for specified tag.
 
List< String > getGraphTags ()
 Method returns list of available graph tags.
 
Sublocation getSublocationById (int id)
 Method is used for obtaining a sublocation with the specified identifier from the current location.
 
Category getCategoryById (int id)
 Method is used for obtaining a category with the specified identifier from the current location.
 

Public Attributes

int get id
 location's identifier.
 
int get version
 location's version.
 
String get name
 location name.
 
String get descript
 location's description.
 
List< Category > get categories
 List of venue categories defined for the location Category.
 
List< Sublocation > get sublocations
 List of sublocations Sublocation.
 
bool get modified
 Flag indicates if location has been modified by user or not.
 

Detailed Description

Class is used for storing location parameters: identifier, version, name, a list of sublocations, etc.

Location instance can be obtained from LocationManager using LocationListener callback, when the location is loaded.

Referenced from LocationManager LocationListener.

Definition at line 24 of file location.dart.

Member Function Documentation

◆ getCategoryById()

Category Location.getCategoryById ( int id)

Method is used for obtaining a category with the specified identifier from the current location.

Parameters
idcategory identifier.
Returns
Category of the current location with the specified identifier, if it exists. If category with the specified identifier doesn't exist, function returns null.

Dart code snippet:

// Get category by ID
if (categories.isNotEmpty) {
Category? category = location.getCategoryById(categories.first.getId());
if (category != null) {
demonstrateCategoryUsage(category);
}
}

◆ getElevationGraph()

ElevationGraph Location.getElevationGraph ( String tag)

Method returns location elevation graph ElevationGraph for specified tag.

Parameters
tagGraph tag in CMS
Returns
Elevation graph instance or null.
ElevationGraph of the current location with the specified tag, if it exists. If elevation graph with the specified tag doesn't exist, function returns null.

Dart code snippet:

// Get elevation graph by tag
if (graphTags.isNotEmpty) {
ElevationGraph? elevationGraph = location.getElevationGraph(graphTags.first);
if (elevationGraph != null) {
demonstrateElevationGraphUsage(elevationGraph);
}
}

◆ getGraphTags()

List< String > Location.getGraphTags ( )

Method returns list of available graph tags.

Returns
Array of existing tags

Dart code snippet:

// Get available graph tags
List<String> graphTags = location.getGraphTags();
print('Available graph tags: $graphTags');

◆ getSublocationById()

Sublocation Location.getSublocationById ( int id)

Method is used for obtaining a sublocation with the specified identifier from the current location.

Parameters
idsublocation identifier.
Returns
The Sublocation of the current location with the specified identifier, if it exists. If sublocation with the specified identifier doesn't exist, function returns null.

Dart code snippet:

// Get sublocation by ID
if (sublocations.isNotEmpty) {
Sublocation? sublocation = location.getSublocationById(sublocations.first.getId());
if (sublocation != null) {
demonstrateSublocationUsage(sublocation);
}
}

Member Data Documentation

◆ categories

List<Category> get Location.categories

List of venue categories defined for the location Category.

Dart code snippet:

// Get all categories
List<Category> categories = location.getCategories();
print('Number of categories: ${categories.length}');

Definition at line 128 of file location.dart.

◆ descript

String get Location.descript

location's description.

Dart code snippet:

// Get location description
String? description = location.getDescript();
print('Location description: $description');

Definition at line 118 of file location.dart.

◆ id

int get Location.id

location's identifier.

Dart code snippet:

// Get location ID
int locationId = location.getId();
print('Location ID: $locationId');

Definition at line 88 of file location.dart.

◆ modified

bool get Location.modified

Flag indicates if location has been modified by user or not.

Dart code snippet:

// Check if location is modified
bool isModified = location.getModified();
print('Location modified: $isModified');

Definition at line 148 of file location.dart.

◆ name

String get Location.name

location name.

Dart code snippet:

// Get location name
String? name = location.getName();
print('Location name: $name');

Definition at line 108 of file location.dart.

◆ sublocations

List<Sublocation> get Location.sublocations

List of sublocations Sublocation.

Dart code snippet:

// Get all sublocations
List<Sublocation> sublocations = location.getSublocations();
print('Number of sublocations: ${sublocations.length}');

Definition at line 138 of file location.dart.

◆ version

int get Location.version

location's version.

Dart code snippet:

// Get location version
int version = location.getVersion();
print('Location version: $version');

Definition at line 98 of file location.dart.


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