Loading...
Searching...
No Matches
LocationWindow Class Referenceabstract

Interface for interacting with the location view. More...

Inherits Finalizable.

Public Member Functions

void setSublocationId (int id)
 Method is used to switch the location view between sublocations (e.g., floors).
 
int getSublocationId ()
 Returns current sublocation ID if set, otherwise null.
 
Camera getEnclosingCamera (BoundingBox boundingBox)
 Calculates camera that fits provided bounding box.
 
Point screenPositionToMeters (math.Point< double > point)
 Converts screen coordinates (pixels) to metrics coordinates (meters).
 
CircleMapObject addCircleMapObject ()
 Creates and adds a circle map object to the location view.
 
bool removeCircleMapObject (CircleMapObject circleMapObject)
 Removes a circle map object from the location view.
 
IconMapObject addIconMapObject ()
 Creates and adds an icon map object to the location view.
 
bool removeIconMapObject (IconMapObject iconMapObject)
 Removes an icon map object from the location view.
 
PolygonMapObject addPolygonMapObject ()
 Creates and adds a polygon map object to the location view.
 
bool removePolygonMapObject (PolygonMapObject polygonMapObject)
 Removes a polygon map object from the location view.
 
PolylineMapObject addPolylineMapObject ()
 Creates and adds a polyline map object to the location view.
 
bool removePolylineMapObject (PolylineMapObject polylineMapObject)
 Removes a polyline map object from the location view.
 
DottedPolylineMapObject addDottedPolylineMapObject ()
 Creates and adds a polyline points map object to the location view.
 
bool removeDottedPolylineMapObject (DottedPolylineMapObject dottedPolylineMapObject)
 Removes a polyline points map object from the location view.
 
void removeAllMapObjects ()
 Removes all map objects from the location view.
 
void pickMapObjectAt (math.Point< double > point)
 Selects a visible, interactive map object at the specified screen position.
 
void pickMapFeatureAt (math.Point< double > point)
 Selects visible map features (e.g., venues) at the specified screen position.
 
void addPickListener (PickListener listener)
 Adds a PickListener to receive picking result events.
 
void removePickListener (PickListener listener)
 Removes a previously added PickListener.
 
void addInputListener (InputListener listener)
 Adds an InputListener to receive input events.
 
void removeInputListener (InputListener listener)
 Removes a previously added InputListener.
 
void addCameraListener (CameraListener listener)
 Adds a CameraListener to receive camera movement events.
 
void removeCameraListener (CameraListener listener)
 Removes a previously added CameraListener.
 
void addSublocationChangeListener (SublocationChangeListener listener)
 Adds listener for sublocation change events.
 
void removeSublocationChangeListener (SublocationChangeListener listener)
 Removes previously added sublocation change listener.
 
void flyTo (Camera camera, int duration, CameraCallback callback)
 Moves the map camera to a new position with an easing animation.
 
void moveTo (Camera camera, int duration, AnimationType animationType, CameraCallback callback)
 Moves the map camera to a new position with a smooth pan-and-zoom animation.
 
bool selectMapFeature (String featureId)
 Selects a map feature by its feature ID.
 
bool deselectMapFeature (String featureId)
 Deselects a map feature by its feature ID.
 
void deselectAllMapFeatures ()
 Deselects all currently selected map features.
 
void applyFilter (String filter, String layer)
 Applies a filter to a specific map layer.
 

Static Public Member Functions

static void setDebugFlag (DebugFlag flag, bool on)
 Sets the state of a debug flag.
 
static bool getDebugFlag (DebugFlag flag)
 Gets the state of a debug flag.
 

Public Attributes

double get zoomFactor
 Specifies the zoom level of the location view, in pixels per meter. Default: approximately 100 meters across the screen width.
 
double get minZoomFactor
 Minimum zoom level for the location view (pixels per meter).
 
double get maxZoomFactor
 Maximum zoom level for the location view (pixels per meter).
 
bool get stickToBorder
 Specifies whether sublocation content sticks to screen borders. If true, content sticks to screen bounds; if false, content is centered. Default: true.
 
Camera get camera
 Current camera position in meters. Camera.
 
bool get rotateGestureEnabled
 Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.
 
bool get tiltGesturesEnabled
 Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.
 
bool get scrollGesturesEnabled
 Specifies whether scroll gestures (e.g., pan gesture) are enabled.
 
bool get zoomGesturesEnabled
 Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.
 
double get pickRadius
 Radius for picking features on the map, in density-independent pixels. Default: 0.5 dp.
 
List< String > get selectedMapFeatures
 List of currently selected map feature IDs.
 

Detailed Description

Interface for interacting with the location view.

Referenced from LocationView.

Definition at line 38 of file location_window.dart.

Member Function Documentation

◆ addCameraListener()

void LocationWindow.addCameraListener ( CameraListener listener)

Adds a CameraListener to receive camera movement events.

Parameters
listenerThe CameraListener instance CameraListener.
Note
Remove the listener when no longer needed.

Dart code snippet:

// Add camera listener
_cameraListener = CameraListenerImpl();
_locationWindow!.addCameraListener(_cameraListener!);
print("Added camera listener");

◆ addCircleMapObject()

CircleMapObject LocationWindow.addCircleMapObject ( )

Creates and adds a circle map object to the location view.

Returns
A CircleMapObject instance CircleMapObject if successful, null otherwise.

Dart code snippet:

// Add circle map object
_circleMapObject = _locationWindow!.addCircleMapObject();
print("Added circle map object");

◆ addDottedPolylineMapObject()

DottedPolylineMapObject LocationWindow.addDottedPolylineMapObject ( )

Creates and adds a polyline points map object to the location view.

Returns
A DottedPolylineMapObject instance DottedPolylineMapObject if successful, null otherwise.

Dart code snippet:

// Add dotted polyline map object
_dottedPolylineMapObject = _locationWindow!.addDottedPolylineMapObject();
print("Added dotted polyline map object");

◆ addIconMapObject()

IconMapObject LocationWindow.addIconMapObject ( )

Creates and adds an icon map object to the location view.

Returns
An IconMapObject instance IconMapObject if successful, null otherwise.

Dart code snippet:

// Add icon map object
_iconMapObject = _locationWindow!.addIconMapObject();
print("Added icon map object");

◆ addInputListener()

void LocationWindow.addInputListener ( InputListener listener)

Adds an InputListener to receive input events.

Parameters
listenerThe InputListener instance InputListener.
Note
Remove the listener when no longer needed.

Dart code snippet:

// Add input listener
_inputListener = InputListenerImpl();
_locationWindow!.addInputListener(_inputListener!);
print("Added input listener");

◆ addPickListener()

void LocationWindow.addPickListener ( PickListener listener)

Adds a PickListener to receive picking result events.

Parameters
listenerThe PickListener instance PickListener.
Note
Remove the listener when no longer needed.

Dart code snippet:

// Add pick listener
_pickListener = PickListenerImpl();
_locationWindow!.addPickListener(_pickListener!);
print("Added pick listener");

◆ addPolygonMapObject()

PolygonMapObject LocationWindow.addPolygonMapObject ( )

Creates and adds a polygon map object to the location view.

Returns
A PolygonMapObject instance PolygonMapObject if successful, null otherwise.

Dart code snippet:

// Add polygon map object
_polygonMapObject = _locationWindow!.addPolygonMapObject();
print("Added polygon map object");

◆ addPolylineMapObject()

PolylineMapObject LocationWindow.addPolylineMapObject ( )

Creates and adds a polyline map object to the location view.

Returns
A PolylineMapObject instance PolylineMapObject if successful, null otherwise.

Dart code snippet:

// Add polyline map object
_polylineMapObject = _locationWindow!.addPolylineMapObject();
print("Added polyline map object");

◆ addSublocationChangeListener()

void LocationWindow.addSublocationChangeListener ( SublocationChangeListener listener)

Adds listener for sublocation change events.

Parameters
listenerSublocation change listener SublocationChangeListener.

Dart code snippet:

_locationWindow!.addSublocationChangeListener(listener);
print("Added sublocation change listener");

◆ applyFilter()

void LocationWindow.applyFilter ( String filter,
String layer )

Applies a filter to a specific map layer.

Parameters
filterThe filter stringю
layerThe map layer to apply the filter to.

◆ deselectAllMapFeatures()

void LocationWindow.deselectAllMapFeatures ( )

Deselects all currently selected map features.

Dart code snippet:

// Deselect all map features
_locationWindow!.deselectAllMapFeatures();
print("Deselected all map features");

◆ deselectMapFeature()

bool LocationWindow.deselectMapFeature ( String featureId)

Deselects a map feature by its feature ID.

Parameters
featureIdThe feature ID from the mapFeaturePickResult PickListener.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Deselect specific map feature
bool deselected = _locationWindow!.deselectMapFeature(featureId);
print("Deselected map feature $featureId: $deselected");

◆ flyTo()

void LocationWindow.flyTo ( Camera camera,
int duration,
CameraCallback callback )

Moves the map camera to a new position with an easing animation.

Parameters
cameraThe new camera position Camera.
durationAnimation duration in milliseconds.
callbackCallback to execute when the animation completes CameraCallback.

Dart code snippet:

// Fly to position with smooth animation
Point targetPoint = Point(150.0, 250.0);
Camera targetCamera = Camera(targetPoint, 75.0, 45.0);
CameraCallback callback = CameraCallback(
onMoveFinished: (completed) {
if (completed) {
print("Fly to animation completed successfully");
} else {
print("Fly to animation was cancelled");
}
},
);
_locationWindow!.flyTo(targetCamera, 2000, callback);
print("Started fly to animation to point (${targetPoint.x}, ${targetPoint.y})");

◆ getDebugFlag()

static bool LocationWindow.getDebugFlag ( DebugFlag flag)
static

Gets the state of a debug flag.

Parameters
flagThe debug flag to query DebugFlag.
Returns
true if the debug flag is enabled, false otherwise.

◆ getEnclosingCamera()

Camera LocationWindow.getEnclosingCamera ( BoundingBox boundingBox)

Calculates camera that fits provided bounding box.

Parameters
boundingBoxMetrics bounding box to enclose.

Dart code snippet:

BoundingBox boundingBox = BoundingBox(Point(0.0, 0.0), Point(20.0, 30.0));
Camera camera = _locationWindow!.getEnclosingCamera(boundingBox);
print("Camera that fits bounding box: $camera");

◆ getSublocationId()

int LocationWindow.getSublocationId ( )

Returns current sublocation ID if set, otherwise null.

Dart code snippet:

int? currentId = _locationWindow!.getSublocationId();
if (currentId != null) {
print("Current sublocation id: $currentId");
} else {
print("Current sublocation id is not set");
}

◆ moveTo()

void LocationWindow.moveTo ( Camera camera,
int duration,
AnimationType animationType,
CameraCallback callback )

Moves the map camera to a new position with a smooth pan-and-zoom animation.

Parameters
cameraThe new camera position Camera.
durationAnimation duration in milliseconds (-1 for default duration).
animationTypeThe type of easing animation AnimationType.
callbackCallback to execute when the animation completes CameraCallback.

Dart code snippet:

// Move to position with linear animation
Point targetPoint = Point(200.0, 300.0);
Camera targetCamera = Camera(targetPoint, 100.0, 90.0);
CameraCallback callback = CameraCallback(
onMoveFinished: (completed) {
print("Move to with linear animation ${completed ? 'completed' : 'cancelled'}");
},
);
_locationWindow!.moveTo(targetCamera, 1500, AnimationType.LINEAR, callback);
print("Started move to with linear animation");

◆ pickMapFeatureAt()

void LocationWindow.pickMapFeatureAt ( math.Point< double > point)

Selects visible map features (e.g., venues) at the specified screen position.

Parameters
pointPosition in screen pixels to pick from. Results are delivered to the PickListener via onMapFeaturePickComplete PickListener.

Dart code snippet:

// Pick map feature at screen position
math.Point<double> featurePoint = math.Point<double>(150.0, 250.0);
_locationWindow!.pickMapFeatureAt(featurePoint);
print("Picked map feature at screen position (${featurePoint.x}, ${featurePoint.y})");

◆ pickMapObjectAt()

void LocationWindow.pickMapObjectAt ( math.Point< double > point)

Selects a visible, interactive map object at the specified screen position.

Parameters
pointPosition in screen pixels to pick from. Results are delivered to the PickListener via onMapObjectPickComplete PickListener.

Dart code snippet:

// Pick map object at screen position
math.Point<double> screenPoint = math.Point<double>(100.0, 200.0);
_locationWindow!.pickMapObjectAt(screenPoint);
print("Picked map object at screen position (${screenPoint.x}, ${screenPoint.y})");

◆ removeAllMapObjects()

void LocationWindow.removeAllMapObjects ( )

Removes all map objects from the location view.

Dart code snippet:

// Remove all map objects
_locationWindow!.removeAllMapObjects();
print("Removed all map objects");

◆ removeCameraListener()

void LocationWindow.removeCameraListener ( CameraListener listener)

Removes a previously added CameraListener.

Parameters
listenerThe CameraListener instance to remove CameraListener.

Dart code snippet:

// Remove camera listener
_locationWindow!.removeCameraListener(_cameraListener!);
_cameraListener = null;
print("Removed camera listener");

◆ removeCircleMapObject()

bool LocationWindow.removeCircleMapObject ( CircleMapObject circleMapObject)

Removes a circle map object from the location view.

Parameters
circleMapObjectThe circle map object instance CircleMapObject.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Remove circle map object
if (_circleMapObject != null) {
bool removed = _locationWindow!.removeCircleMapObject(_circleMapObject!);
print("Removed circle map object: $removed");
_circleMapObject = null;
}

◆ removeDottedPolylineMapObject()

bool LocationWindow.removeDottedPolylineMapObject ( DottedPolylineMapObject dottedPolylineMapObject)

Removes a polyline points map object from the location view.

Parameters
dottedPolylineMapObjectThe polyline points map object instance DottedPolylineMapObject.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Remove dotted polyline map object
if (_dottedPolylineMapObject != null) {
bool removed = _locationWindow!.removeDottedPolylineMapObject(
_dottedPolylineMapObject!,
);
print("Removed dotted polyline map object: $removed");
_dottedPolylineMapObject = null;
}

◆ removeIconMapObject()

bool LocationWindow.removeIconMapObject ( IconMapObject iconMapObject)

Removes an icon map object from the location view.

Parameters
iconMapObjectThe icon map object instance IconMapObject.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Remove icon map object
if (_iconMapObject != null) {
bool removed = _locationWindow!.removeIconMapObject(_iconMapObject!);
print("Removed icon map object: $removed");
_iconMapObject = null;
}

◆ removeInputListener()

void LocationWindow.removeInputListener ( InputListener listener)

Removes a previously added InputListener.

Parameters
listenerThe InputListener instance to remove InputListener.

Dart code snippet:

// Remove input listener
_locationWindow!.removeInputListener(_inputListener!);
_inputListener = null;
print("Removed input listener");

◆ removePickListener()

void LocationWindow.removePickListener ( PickListener listener)

Removes a previously added PickListener.

Parameters
listenerThe PickListener instance to remove PickListener.

Dart code snippet:

_locationWindow!.removePickListener(listeners[i]);
print("Removed pick listener $i");

◆ removePolygonMapObject()

bool LocationWindow.removePolygonMapObject ( PolygonMapObject polygonMapObject)

Removes a polygon map object from the location view.

Parameters
polygonMapObjectThe polygon map object instance PolygonMapObject.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Remove polygon map object
if (_polygonMapObject != null) {
bool removed = _locationWindow!.removePolygonMapObject(
_polygonMapObject!,
);
print("Removed polygon map object: $removed");
_polygonMapObject = null;
}

◆ removePolylineMapObject()

bool LocationWindow.removePolylineMapObject ( PolylineMapObject polylineMapObject)

Removes a polyline map object from the location view.

Parameters
polylineMapObjectThe polyline map object instance PolylineMapObject.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Remove polyline map object
if (_polylineMapObject != null) {
bool removed = _locationWindow!.removePolylineMapObject(
_polylineMapObject!,
);
print("Removed polyline map object: $removed");
_polylineMapObject = null;
}

◆ removeSublocationChangeListener()

void LocationWindow.removeSublocationChangeListener ( SublocationChangeListener listener)

Removes previously added sublocation change listener.

Parameters
listenerListener instance to remove SublocationChangeListener.

Dart code snippet:

_locationWindow!.removeSublocationChangeListener(listener);
print("Removed sublocation change listener");

◆ screenPositionToMeters()

Point LocationWindow.screenPositionToMeters ( math.Point< double > point)

Converts screen coordinates (pixels) to metrics coordinates (meters).

Parameters
point(x,y) coordinates in screen pixels.
Returns
(x,y) coordinates in meters Point.

Dart code snippet:

// Convert screen position to meters
Point screenPoint = Point(100.0, 200.0);
Point metersPoint = _locationWindow!.screenPositionToMeters(screenPoint);
print("Screen position (${screenPoint.x}, ${screenPoint.y}) converted to meters: (${metersPoint.x}, ${metersPoint.y})");

◆ selectMapFeature()

bool LocationWindow.selectMapFeature ( String featureId)

Selects a map feature by its feature ID.

Parameters
featureIdThe feature ID from the mapFeaturePickResult PickListener.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Select map feature by ID
String featureId = "room_101";
bool selected = _locationWindow!.selectMapFeature(featureId);
print("Selected map feature $featureId: $selected");

◆ setDebugFlag()

static void LocationWindow.setDebugFlag ( DebugFlag flag,
bool on )
static

Sets the state of a debug flag.

Parameters
flagThe debug flag to set DebugFlag.
onSpecifies whether the debug flag is enabled (true) or disabled (false).

◆ setSublocationId()

void LocationWindow.setSublocationId ( int id)

Method is used to switch the location view between sublocations (e.g., floors).

Parameters
idSublocation unique identifier Sublocation.

Dart code snippet:

// Set sublocation ID to switch between floors
_locationWindow!.setSublocationId(1);
print("Set sublocation ID to 1 (first floor)");

Member Data Documentation

◆ camera

Camera get LocationWindow.camera

Current camera position in meters. Camera.

Dart code snippet:

// Set camera position without animation
_locationWindow!.camera = newCamera;
print("Set camera position to (${newPoint.x}, ${newPoint.y}) with zoom 50.0 and rotation 0°");

Definition at line 548 of file location_window.dart.

◆ maxZoomFactor

double get LocationWindow.maxZoomFactor

Maximum zoom level for the location view (pixels per meter).

Dart code snippet:

// Set maximum zoom factor
_locationWindow!.maxZoomFactor = 300.0;
print("Set maximum zoom factor to 300.0");

Definition at line 522 of file location_window.dart.

◆ minZoomFactor

double get LocationWindow.minZoomFactor

Minimum zoom level for the location view (pixels per meter).

Dart code snippet:

// Set minimum zoom factor
_locationWindow!.minZoomFactor = 50.0;
print("Set minimum zoom factor to 50.0");

Definition at line 510 of file location_window.dart.

◆ pickRadius

double get LocationWindow.pickRadius

Radius for picking features on the map, in density-independent pixels. Default: 0.5 dp.

Dart code snippet:

// Set pick radius
_locationWindow!.pickRadius = 10.0;
print("Set pick radius to 10.0 pixels");

Definition at line 609 of file location_window.dart.

◆ rotateGestureEnabled

bool get LocationWindow.rotateGestureEnabled

Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.

Dart code snippet:

// Set rotate gesture enabled
_locationWindow!.rotateGestureEnabled = true;
print("Set rotate gesture enabled to true");

Definition at line 560 of file location_window.dart.

◆ scrollGesturesEnabled

bool get LocationWindow.scrollGesturesEnabled

Specifies whether scroll gestures (e.g., pan gesture) are enabled.

Dart code snippet:

// Set scroll gestures enabled
_locationWindow!.scrollGesturesEnabled = true;
print("Set scroll gestures enabled to true");

Definition at line 584 of file location_window.dart.

◆ selectedMapFeatures

List<String> get LocationWindow.selectedMapFeatures

List of currently selected map feature IDs.

Dart code snippet:

// Get list of selected map features
List<String> selectedFeatures = _locationWindow!.selectedMapFeatures;
print("Currently selected map features: ${selectedFeatures.length} features");
for (String feature in selectedFeatures) {
print(" - $feature");
}

Definition at line 621 of file location_window.dart.

◆ stickToBorder

bool get LocationWindow.stickToBorder

Specifies whether sublocation content sticks to screen borders. If true, content sticks to screen bounds; if false, content is centered. Default: true.

Dart code snippet:

// Set stick to border property
_locationWindow!.stickToBorder = true;
print("Set stick to border to true");

Definition at line 535 of file location_window.dart.

◆ tiltGesturesEnabled

bool get LocationWindow.tiltGesturesEnabled

Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.

Dart code snippet:

// Set tilt gestures enabled
_locationWindow!.tiltGesturesEnabled = true;
print("Set tilt gestures enabled to true");

Definition at line 572 of file location_window.dart.

◆ zoomFactor

double get LocationWindow.zoomFactor

Specifies the zoom level of the location view, in pixels per meter. Default: approximately 100 meters across the screen width.

Dart code snippet:

// Set zoom factor
_locationWindow!.zoomFactor = 150.0;
print("Set zoom factor to 150.0");

Definition at line 498 of file location_window.dart.

◆ zoomGesturesEnabled

bool get LocationWindow.zoomGesturesEnabled

Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.

Dart code snippet:

// Set zoom gestures enabled
_locationWindow!.zoomGesturesEnabled = true;
print("Set zoom gestures enabled to true");

Definition at line 596 of file location_window.dart.


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