LocationDisplay class final
Manages the display of a device's location in an ArcGISMapViewController.
Location display can retrieve the device's current location from a LocationDataSource and display it on top of an ArcGISMap. As the device moves, the map view can respond to new locations by updating the position of the location symbol on the display. It can also set the viewpoint when an updated location is received, or automatically pan and rotate the map when the current location, heading, or course changes.
Each ArcGISMapViewController has its own instance of LocationDisplay so you don't have to explicitly instantiate the location display. The location information is provided by a LocationDataSource. The current position of the device is provided by default from the operating system. To start receiving location updates, and display the current location, you must start the location display's data source.
Apart from the device operating system's built-in location, you can also display locations from other sources, including external (high accuracy) GPS, an indoor positioning system (IPS), or simulated locations (for mocking location updates) using the following location data sources:
- SimulatedLocationDataSource
- NmeaLocationDataSource
- IndoorsLocationDataSource
- RouteTrackerLocationDataSource
By default, the location display uses a blue, round symbol to show the current location. Depending on signal strength, satellite positions, and other factors, the accuracy of the reported location can vary. An additional blue circle (LocationDisplay.accuracySymbol) around the location symbol indicates the estimated range of accuracy for the current location. As locations are read from the configured LocationDataSource, this outer circle may contract and expand as accuracy increases or decreases. You can display further information about the location using the following symbols:
- LocationDisplay.acquiringSymbol
- LocationDisplay.courseSymbol
- LocationDisplay.headingSymbol
- LocationDisplay.pingAnimationSymbol
You can change the default symbology of these symbols to make them more visible against the underlying map cartography, increase their visibility for visually impaired users, or match an app's visual appearance.
- Implemented types
Properties
- accuracySymbol ↔ ArcGISSymbol
-
A symbol used to represent location accuracy.
getter/setter pair
- acquiringSymbol ↔ ArcGISSymbol
-
The symbol used to display the last known location while the current
location is being acquired.
getter/setter pair
- autoPanMode ↔ LocationDisplayAutoPanMode
-
Defines how the ArcGISMapViewController reacts when location updates are
received.
getter/setter pair
- courseSymbol ↔ ArcGISSymbol
-
The symbol used to display the current location and the course (direction
of travel) when moving.
getter/setter pair
- dataSource ↔ LocationDataSource
-
The location data source used for generating location updates.
getter/setter pair
- defaultSymbol ↔ ArcGISSymbol
-
The symbol used for the location when not moving.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- heading → double
-
The heading angle of the current location in degrees relative to north.
no setter
- headingSymbol ↔ ArcGISSymbol
-
The symbol used for the location when the auto-pan mode is
LocationDisplayAutoPanMode.compassNavigation.
getter/setter pair
- initialZoomScale ↔ double
-
The scale that the map should automatically be zoomed to upon receiving
the first location update.
getter/setter pair
- location → ArcGISLocation?
-
The most recent location reported by the location data source.
no setter
- mapLocation → ArcGISPoint?
-
The map position of the most recent location reported by the location data
source in the projection of the current map view.
no setter
-
The navigation point height factor. The factor will decide the location
symbol position vertically from the bottom of the map when the auto-pan
mode is LocationDisplayAutoPanMode.navigation. When navigating in a map,
the current location is typically vertically positioned near the bottom of
the map, and horizontally centered in the map, so that the map displays as
much of the route ahead as possible.
getter/setter pair
-
onAutoPanModeChanged
→ Stream<
LocationDisplayAutoPanMode> -
Sets a callback to be invoked when the LocationDisplay.autoPanMode of
the location display has been changed.
no setter
-
onLocationChanged
→ Stream<
ArcGISLocation> -
Sets a callback to be invoked when the location property of the location
display has been changed.
no setter
-
onStatusChanged
→ Stream<
bool> -
Sets a callback to be invoked when the started property of the location
display has been changed.
no setter
- opacity ↔ double
-
The opacity value of all symbols displayed by the LocationDisplay. The
value should be between 0 and 1.
getter/setter pair
- pingAnimationSymbol ↔ ArcGISSymbol
-
The symbol that will be animated around the location symbol, to indicate
when location updates are received.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAccuracy ↔ bool
-
True if the LocationDisplay.accuracySymbol is shown, false otherwise.
getter/setter pair
- showLocation ↔ bool
-
True if location symbols are shown, false otherwise.
getter/setter pair
- showPingAnimationSymbol ↔ bool
-
True if the LocationDisplay.pingAnimationSymbol is shown, false
otherwise.
getter/setter pair
- started → bool
-
True if the location display is currently active (the LocationDataSource
has been started), false otherwise.
no setter
- useCourseSymbolOnMovement ↔ bool
-
True if the LocationDisplay.courseSymbol is used to display current
location, when the location updates indicate the device is moving, false
otherwise.
getter/setter pair
- wanderExtentFactor ↔ double
-
The wander extent factor controls the re-centering behavior of the
ArcGISMapViewController when the location changes.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → void - The method is to call the start callback function of the location data source.
-
stop(
) → void - The method is to call the stop callback function of the location data source.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited