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. | |
| void | setOperatingMode (OperatingMode mode) |
| Sets the operating mode of the location view OperatingMode. Default: indoor_only. | |
| OperatingMode | getOperatingMode () |
| Returns the current operating mode OperatingMode. | |
| String | getAttribution () |
Attribution text for the outdoor tiles. Comes from tileProvider.attribution when set. A null vector source uses the OSM default. | |
| Camera | getEnclosingCamera (BoundingBox boundingBox) |
Camera that fits boundingBox into the current focus rect. Uses focusRect when set, otherwise the full viewport. Keeps the current azimuth and tilt (tilt fit is approximate). | |
| Camera | getEnclosingCameraWithFocus (BoundingBox boundingBox, ScreenRect? focusRect, double? azimuth, double? tilt) |
Camera that fits boundingBox, with optional overrides. Null focusRect / azimuth / tilt keep the current window values (focusRect property, current camera). Azimuth and tilt are degrees, same units as Camera. | |
| GlobalPoint | screenPositionToGlobal (math.Point< double > point) |
| Converts screen coordinates (pixels) to WGS84 coordinates. | |
| 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. | |
| ClusterMapObjectController | addClusterMapObjectController () |
| Creates an icon map object controller for the location view. | |
| bool | removeClusterMapObjectController (ClusterMapObjectController controller) |
| Removes an icon map object controller 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. | |
| GeoJsonImport | addGeoJson (String geoJson, int? sublocationId) |
Adds polygons and lines from one GeoJSON document on a floor. Accepts a FeatureCollection, a Feature, or one geometry, the same inputs as a GeoJSON source. Polygon holes become LocationPolygon.innerRings. Points are skipped. Returns null when the document is not JSON. The host styles the returned objects. | |
| PointBatch | addPointBatch () |
| Creates one arrow cloud. Replace its points each frame. | |
| bool | removePointBatch (PointBatch pointBatch) |
| Removes an arrow cloud. | |
| 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. | |
| ModelMapObject | addModelMapObject () |
| Creates and adds a 3D model map object (Wavefront OBJ + texture via ModelProvider). | |
| bool | removeModelMapObject (ModelMapObject modelMapObject) |
| Removes a model 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 | addBuildingListener (BuildingListener listener) |
| Adds listener for outdoor scenario: when camera focuses on a building or leaves it. | |
| void | removeBuildingListener (BuildingListener listener) |
| Removes previously added indoor building listener. | |
| void | flyTo (Camera camera, int duration, CameraCallback callback) |
| Moves the map camera to a new position with a smooth pan-and-zoom (fly) animation. | |
| void | moveTo (Camera camera, int duration, AnimationType animationType, CameraCallback callback) |
| Moves the map camera to a new position with an easing 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 | applyLayerFilter (String layer, List< MapFilterCondition > conditions) |
| Applies a typed filter to a specific map layer. | |
| bool | isValid () |
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 | |
| MapTheme get | mapTheme |
| Outdoor vector basemap color theme MapTheme. Indoor rasters, venues, and user map objects are unchanged. Default: light. | |
| TileProvider get | tileProvider |
Outdoor tile source TileProvider. kind vector draws MVT (schema must match the tiles). kind raster draws PNG, JPEG, or WebP imagery and hides outdoor vector geometry and labels. schema is ignored for raster. Indoor floors stay on top. Null (default) uses OSM Shortbread at vector.openstreetmap.org. When mbtiles is set, tiles are read only from that file. | |
| AttributionAlignment get | attributionAlignment |
| Screen placement of the OSM attribution overlay AttributionAlignment. Default: right + bottom. Visible only in outdoor / outdoor_indoor modes. | |
| 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. | |
| Camera get | camera |
| Current camera position (look-at in WGS84). Camera. | |
| ScreenRect get | focusRect |
Area of the viewport used when fitting a bounding box. Null (default) is the full view. Set this for a floor selector, follow-me button, or POI card so getEnclosingCamera keeps geometry in the remaining rectangle. Coordinates are screen pixels ScreenRect. | |
| VisibleRegion get | focusRegion |
Four corners of focusRect in WGS84, or visibleRegion when focusRect is null VisibleRegion. | |
| VisibleRegion get | visibleRegion |
Four corners of the current viewport in WGS84 VisibleRegion. Corners are ray-cast onto the ground plane, same as screenPositionToGlobal. With tilt the shape is a trapezoid. | |
| 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 |
| Extra slop around the hit target, in density-independent pixels. Applied as a screen-pixel radius for points/lines and as a margin around a label's real AABB. Default: 5 dp. | |
| List< String > get | selectedMapFeatures |
| List of currently selected map feature IDs. | |
Interface for interacting with the location view.
Referenced from LocationView.
Definition at line 56 of file location_window.dart.
| void LocationWindow.addBuildingListener | ( | BuildingListener | listener | ) |
Adds listener for outdoor scenario: when camera focuses on a building or leaves it.
| listener | Indoor building listener BuildingListener. |
Dart code snippet:
| void LocationWindow.addCameraListener | ( | CameraListener | listener | ) |
Adds a CameraListener to receive camera movement events.
| listener | The CameraListener instance CameraListener. |
Dart code snippet:
| CircleMapObject LocationWindow.addCircleMapObject | ( | ) |
Creates and adds a circle map object to the location view.
Dart code snippet:
| ClusterMapObjectController LocationWindow.addClusterMapObjectController | ( | ) |
Creates an icon map object controller for the location view.
Dart code snippet:
| DottedPolylineMapObject LocationWindow.addDottedPolylineMapObject | ( | ) |
Creates and adds a polyline points map object to the location view.
Dart code snippet:
| GeoJsonImport LocationWindow.addGeoJson | ( | String | geoJson, |
| int? | sublocationId ) |
Adds polygons and lines from one GeoJSON document on a floor. Accepts a FeatureCollection, a Feature, or one geometry, the same inputs as a GeoJSON source. Polygon holes become LocationPolygon.innerRings. Points are skipped. Returns null when the document is not JSON. The host styles the returned objects.
| geoJson | GeoJSON text. |
| sublocationId | Floor for every object, or null for the outdoor map. |
Dart code snippet:
| IconMapObject LocationWindow.addIconMapObject | ( | ) |
Creates and adds an icon map object to the location view.
Dart code snippet:
| void LocationWindow.addInputListener | ( | InputListener | listener | ) |
Adds an InputListener to receive input events.
| listener | The InputListener instance InputListener. |
Dart code snippet:
| ModelMapObject LocationWindow.addModelMapObject | ( | ) |
Creates and adds a 3D model map object (Wavefront OBJ + texture via ModelProvider).
Dart code snippet:
| void LocationWindow.addPickListener | ( | PickListener | listener | ) |
Adds a PickListener to receive picking result events.
| listener | The PickListener instance PickListener. |
Dart code snippet:
| PointBatch LocationWindow.addPointBatch | ( | ) |
Creates one arrow cloud. Replace its points each frame.
Dart code snippet:
| PolygonMapObject LocationWindow.addPolygonMapObject | ( | ) |
Creates and adds a polygon map object to the location view.
Dart code snippet:
| PolylineMapObject LocationWindow.addPolylineMapObject | ( | ) |
Creates and adds a polyline map object to the location view.
Dart code snippet:
| void LocationWindow.addSublocationChangeListener | ( | SublocationChangeListener | listener | ) |
Adds listener for sublocation change events.
| listener | Sublocation change listener SublocationChangeListener. |
Dart code snippet:
| void LocationWindow.applyLayerFilter | ( | String | layer, |
| List< MapFilterCondition > | conditions ) |
Applies a typed filter to a specific map layer.
| layer | The map layer to apply the filter to. |
| conditions | List of conditions (property + allowed values). Empty list resets the filter (show all). |
Dart code snippet:
| void LocationWindow.deselectAllMapFeatures | ( | ) |
Deselects all currently selected map features.
Dart code snippet:
| bool LocationWindow.deselectMapFeature | ( | String | featureId | ) |
Deselects a map feature by its feature ID.
| featureId | The feature ID from the mapFeaturePickResult PickListener. |
Dart code snippet:
| void LocationWindow.flyTo | ( | Camera | camera, |
| int | duration, | ||
| CameraCallback | callback ) |
Moves the map camera to a new position with a smooth pan-and-zoom (fly) animation.
| camera | The new camera position Camera. |
| duration | Animation duration in milliseconds (-1 derives it from the distance). |
| callback | Callback to execute when the animation completes CameraCallback. |
Dart code snippet:
| String LocationWindow.getAttribution | ( | ) |
Attribution text for the outdoor tiles. Comes from tileProvider.attribution when set. A null vector source uses the OSM default.
Dart code snippet:
|
static |
Gets the state of a debug flag.
| flag | The debug flag to query DebugFlag. |
Dart code snippet:
| Camera LocationWindow.getEnclosingCamera | ( | BoundingBox | boundingBox | ) |
Camera that fits boundingBox into the current focus rect. Uses focusRect when set, otherwise the full viewport. Keeps the current azimuth and tilt (tilt fit is approximate).
| boundingBox | WGS84 bounding box to enclose. |
Dart code snippet:
| Camera LocationWindow.getEnclosingCameraWithFocus | ( | BoundingBox | boundingBox, |
| ScreenRect? | focusRect, | ||
| double? | azimuth, | ||
| double? | tilt ) |
Camera that fits boundingBox, with optional overrides. Null focusRect / azimuth / tilt keep the current window values (focusRect property, current camera). Azimuth and tilt are degrees, same units as Camera.
Dart code snippet:
| OperatingMode LocationWindow.getOperatingMode | ( | ) |
Returns the current operating mode OperatingMode.
Dart code snippet:
| int LocationWindow.getSublocationId | ( | ) |
Returns current sublocation ID if set, otherwise null.
Dart code snippet:
| bool LocationWindow.isValid | ( | ) |
| void LocationWindow.moveTo | ( | Camera | camera, |
| int | duration, | ||
| AnimationType | animationType, | ||
| CameraCallback | callback ) |
Moves the map camera to a new position with an easing animation.
| camera | The new camera position Camera. |
| duration | Animation duration in milliseconds (-1 for default duration). |
| animationType | The type of easing animation AnimationType. |
| callback | Callback to execute when the animation completes CameraCallback. |
Dart code snippet:
| void LocationWindow.pickMapFeatureAt | ( | math.Point< double > | point | ) |
Selects visible map features (e.g., venues) at the specified screen position.
| point | Position in screen pixels to pick from. Results are delivered to the PickListener via onMapFeaturePickComplete PickListener. |
Dart code snippet:
| void LocationWindow.pickMapObjectAt | ( | math.Point< double > | point | ) |
Selects a visible, interactive map object at the specified screen position.
| point | Position in screen pixels to pick from. Results are delivered to the PickListener via onMapObjectPickComplete PickListener. |
Dart code snippet:
| void LocationWindow.removeAllMapObjects | ( | ) |
Removes all map objects from the location view.
Dart code snippet:
| void LocationWindow.removeBuildingListener | ( | BuildingListener | listener | ) |
Removes previously added indoor building listener.
| listener | Listener instance to remove BuildingListener. |
Dart code snippet:
| void LocationWindow.removeCameraListener | ( | CameraListener | listener | ) |
Removes a previously added CameraListener.
| listener | The CameraListener instance to remove CameraListener. |
Dart code snippet:
| bool LocationWindow.removeCircleMapObject | ( | CircleMapObject | circleMapObject | ) |
Removes a circle map object from the location view.
| circleMapObject | The circle map object instance CircleMapObject. |
Dart code snippet:
| bool LocationWindow.removeClusterMapObjectController | ( | ClusterMapObjectController | controller | ) |
Removes an icon map object controller from the location view.
| controller | The controller instance to remove. |
Dart code snippet:
| bool LocationWindow.removeDottedPolylineMapObject | ( | DottedPolylineMapObject | dottedPolylineMapObject | ) |
Removes a polyline points map object from the location view.
| dottedPolylineMapObject | The polyline points map object instance DottedPolylineMapObject. |
Dart code snippet:
| bool LocationWindow.removeIconMapObject | ( | IconMapObject | iconMapObject | ) |
Removes an icon map object from the location view.
| iconMapObject | The icon map object instance IconMapObject. |
Dart code snippet:
| void LocationWindow.removeInputListener | ( | InputListener | listener | ) |
Removes a previously added InputListener.
| listener | The InputListener instance to remove InputListener. |
Dart code snippet:
| bool LocationWindow.removeModelMapObject | ( | ModelMapObject | modelMapObject | ) |
Removes a model map object from the location view.
| modelMapObject | The model instance to remove ModelMapObject. |
Dart code snippet:
| void LocationWindow.removePickListener | ( | PickListener | listener | ) |
Removes a previously added PickListener.
| listener | The PickListener instance to remove PickListener. |
Dart code snippet:
| bool LocationWindow.removePointBatch | ( | PointBatch | pointBatch | ) |
Removes an arrow cloud.
| bool LocationWindow.removePolygonMapObject | ( | PolygonMapObject | polygonMapObject | ) |
Removes a polygon map object from the location view.
| polygonMapObject | The polygon map object instance PolygonMapObject. |
Dart code snippet:
| bool LocationWindow.removePolylineMapObject | ( | PolylineMapObject | polylineMapObject | ) |
Removes a polyline map object from the location view.
| polylineMapObject | The polyline map object instance PolylineMapObject. |
Dart code snippet:
| void LocationWindow.removeSublocationChangeListener | ( | SublocationChangeListener | listener | ) |
Removes previously added sublocation change listener.
| listener | Listener instance to remove SublocationChangeListener. |
Dart code snippet:
| GlobalPoint LocationWindow.screenPositionToGlobal | ( | math.Point< double > | point | ) |
Converts screen coordinates (pixels) to WGS84 coordinates.
| point | (x,y) coordinates in screen pixels. |
Dart code snippet:
| bool LocationWindow.selectMapFeature | ( | String | featureId | ) |
Selects a map feature by its feature ID.
| featureId | The feature ID from the mapFeaturePickResult PickListener. |
Dart code snippet:
|
static |
Sets the state of a debug flag.
| flag | The debug flag to set DebugFlag. |
| on | Specifies whether the debug flag is enabled (true) or disabled (false). |
Dart code snippet:
| void LocationWindow.setOperatingMode | ( | OperatingMode | mode | ) |
Sets the operating mode of the location view OperatingMode. Default: indoor_only.
Dart code snippet:
| void LocationWindow.setSublocationId | ( | int | id | ) |
Method is used to switch the location view between sublocations (e.g., floors).
| id | Sublocation unique identifier Sublocation. |
Dart code snippet:
| AttributionAlignment get LocationWindow.attributionAlignment |
Screen placement of the OSM attribution overlay AttributionAlignment. Default: right + bottom. Visible only in outdoor / outdoor_indoor modes.
Dart code snippet:
Definition at line 737 of file location_window.dart.
| Camera get LocationWindow.camera |
Current camera position (look-at in WGS84). Camera.
Dart code snippet:
Definition at line 800 of file location_window.dart.
| ScreenRect get LocationWindow.focusRect |
Area of the viewport used when fitting a bounding box. Null (default) is the full view. Set this for a floor selector, follow-me button, or POI card so getEnclosingCamera keeps geometry in the remaining rectangle. Coordinates are screen pixels ScreenRect.
Dart code snippet:
Definition at line 815 of file location_window.dart.
| VisibleRegion get LocationWindow.focusRegion |
Four corners of focusRect in WGS84, or visibleRegion when focusRect is null VisibleRegion.
Dart code snippet:
Definition at line 828 of file location_window.dart.
| MapTheme get LocationWindow.mapTheme |
Outdoor vector basemap color theme MapTheme. Indoor rasters, venues, and user map objects are unchanged. Default: light.
Dart code snippet:
Definition at line 706 of file location_window.dart.
| double get LocationWindow.maxZoomFactor |
Maximum zoom level for the location view (pixels per meter).
Dart code snippet:
Definition at line 774 of file location_window.dart.
| double get LocationWindow.minZoomFactor |
Minimum zoom level for the location view (pixels per meter).
Dart code snippet:
Definition at line 762 of file location_window.dart.
| double get LocationWindow.pickRadius |
Extra slop around the hit target, in density-independent pixels. Applied as a screen-pixel radius for points/lines and as a margin around a label's real AABB. Default: 5 dp.
Dart code snippet:
Definition at line 903 of file location_window.dart.
| bool get LocationWindow.rotateGestureEnabled |
Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.
Dart code snippet:
Definition at line 853 of file location_window.dart.
| bool get LocationWindow.scrollGesturesEnabled |
Specifies whether scroll gestures (e.g., pan gesture) are enabled.
Dart code snippet:
Definition at line 877 of file location_window.dart.
| List<String> get LocationWindow.selectedMapFeatures |
List of currently selected map feature IDs.
Dart code snippet:
Definition at line 915 of file location_window.dart.
| 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:
Definition at line 787 of file location_window.dart.
| TileProvider get LocationWindow.tileProvider |
Outdoor tile source TileProvider. kind vector draws MVT (schema must match the tiles). kind raster draws PNG, JPEG, or WebP imagery and hides outdoor vector geometry and labels. schema is ignored for raster. Indoor floors stay on top. Null (default) uses OSM Shortbread at vector.openstreetmap.org. When mbtiles is set, tiles are read only from that file.
Dart code snippet:
Definition at line 724 of file location_window.dart.
| bool get LocationWindow.tiltGesturesEnabled |
Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.
Dart code snippet:
Definition at line 865 of file location_window.dart.
| VisibleRegion get LocationWindow.visibleRegion |
Four corners of the current viewport in WGS84 VisibleRegion. Corners are ray-cast onto the ground plane, same as screenPositionToGlobal. With tilt the shape is a trapezoid.
Dart code snippet:
Definition at line 842 of file location_window.dart.
| 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:
Definition at line 750 of file location_window.dart.
| bool get LocationWindow.zoomGesturesEnabled |
Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.
Dart code snippet:
Definition at line 889 of file location_window.dart.