LocationIndicatorLayer

fun LocationIndicatorLayer(layerId: String = remember { generateRandomLayerId("location-indicator") }, bearingImage: ImageValue = ImageValue.INITIAL, shadowImage: ImageValue = ImageValue.INITIAL, topImage: ImageValue = ImageValue.INITIAL, accuracyRadius: DoubleValue = DoubleValue.INITIAL, accuracyRadiusTransition: Transition = Transition.INITIAL, accuracyRadiusBorderColor: ColorValue = ColorValue.INITIAL, accuracyRadiusBorderColorTransition: Transition = Transition.INITIAL, accuracyRadiusColor: ColorValue = ColorValue.INITIAL, accuracyRadiusColorTransition: Transition = Transition.INITIAL, bearing: DoubleValue = DoubleValue.INITIAL, bearingTransition: Transition = Transition.INITIAL, bearingImageSize: DoubleValue = DoubleValue.INITIAL, bearingImageSizeTransition: Transition = Transition.INITIAL, emphasisCircleColor: ColorValue = ColorValue.INITIAL, emphasisCircleColorTransition: Transition = Transition.INITIAL, emphasisCircleRadius: DoubleValue = DoubleValue.INITIAL, emphasisCircleRadiusTransition: Transition = Transition.INITIAL, imagePitchDisplacement: DoubleValue = DoubleValue.INITIAL, location: DoubleListValue = DoubleListValue.INITIAL, locationTransition: Transition = Transition.INITIAL, locationIndicatorOpacity: DoubleValue = DoubleValue.INITIAL, locationIndicatorOpacityTransition: Transition = Transition.INITIAL, perspectiveCompensation: DoubleValue = DoubleValue.INITIAL, shadowImageSize: DoubleValue = DoubleValue.INITIAL, shadowImageSizeTransition: Transition = Transition.INITIAL, topImageSize: DoubleValue = DoubleValue.INITIAL, topImageSizeTransition: Transition = Transition.INITIAL, visibility: VisibilityValue = VisibilityValue.INITIAL, minZoom: LongValue = LongValue.INITIAL, maxZoom: LongValue = LongValue.INITIAL, sourceLayer: StringValue = StringValue.INITIAL, filter: Filter = Filter.INITIAL)

Location Indicator layer.

See also

Parameters

layerId

the ID of the layer, by default, a random id will be generated with UUID.

bearingImage

Name of image in sprite to use as the middle of the location indicator.

shadowImage

Name of image in sprite to use as the background of the location indicator.

topImage

Name of image in sprite to use as the top of the location indicator.

accuracyRadius

The accuracy, in meters, of the position source used to retrieve the position of the location indicator. Default value: 0.

accuracyRadiusTransition

Defines the transition of accuracyRadius. Default value: 0.

accuracyRadiusBorderColor

The color for drawing the accuracy radius border. To adjust transparency, set the alpha component of the color accordingly. Default value: "#ffffff".

accuracyRadiusBorderColorTransition

Defines the transition of accuracyRadiusBorderColor. Default value: "#ffffff".

accuracyRadiusColor

The color for drawing the accuracy radius, as a circle. To adjust transparency, set the alpha component of the color accordingly. Default value: "#ffffff".

accuracyRadiusColorTransition

Defines the transition of accuracyRadiusColor. Default value: "#ffffff".

bearing

The bearing of the location indicator. Default value: 0.

bearingTransition

Defines the transition of bearing. Default value: 0.

bearingImageSize

The size of the bearing image, as a scale factor applied to the size of the specified image. Default value: 1.

bearingImageSizeTransition

Defines the transition of bearingImageSize. Default value: 1.

emphasisCircleColor

The color of the circle emphasizing the indicator. To adjust transparency, set the alpha component of the color accordingly. Default value: "#ffffff".

emphasisCircleColorTransition

Defines the transition of emphasisCircleColor. Default value: "#ffffff".

emphasisCircleRadius

The radius, in pixel, of the circle emphasizing the indicator, drawn between the accuracy radius and the indicator shadow. Default value: 0.

emphasisCircleRadiusTransition

Defines the transition of emphasisCircleRadius. Default value: 0.

imagePitchDisplacement

The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence. Default value: "0".

location

An array of latitude, longitude, altitude position of the location indicator. Default value: 0,0,0.

locationTransition

Defines the transition of location. Default value: 0,0,0.

locationIndicatorOpacity

The opacity of the entire location indicator layer. Default value: 1. Value range: 0, 1

locationIndicatorOpacityTransition

Defines the transition of locationIndicatorOpacity. Default value: 1. Value range: 0, 1

perspectiveCompensation

The amount of the perspective compensation, between 0 and 1. A value of 1 produces a location indicator of constant width across the screen. A value of 0 makes it scale naturally according to the viewing projection. Default value: "0.85".

shadowImageSize

The size of the shadow image, as a scale factor applied to the size of the specified image. Default value: 1.

shadowImageSizeTransition

Defines the transition of shadowImageSize. Default value: 1.

topImageSize

The size of the top image, as a scale factor applied to the size of the specified image. Default value: 1.

topImageSizeTransition

Defines the transition of topImageSize. Default value: 1.

visibility

Whether this layer is displayed. Default value: "visible".

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden. Value range: 0, 24

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden. Value range: 0, 24

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.