LocationIndicatorLayer

fun LocationIndicatorLayer(layerId: String = remember { generateRandomLayerId("location-indicator") }, bearingImage: BearingImage = BearingImage.default, shadowImage: ShadowImage = ShadowImage.default, topImage: TopImage = TopImage.default, accuracyRadius: AccuracyRadius = AccuracyRadius.default, accuracyRadiusTransition: Transition = Transition.default, accuracyRadiusBorderColor: AccuracyRadiusBorderColor = AccuracyRadiusBorderColor.default, accuracyRadiusBorderColorTransition: Transition = Transition.default, accuracyRadiusColor: AccuracyRadiusColor = AccuracyRadiusColor.default, accuracyRadiusColorTransition: Transition = Transition.default, bearing: Bearing = Bearing.default, bearingTransition: Transition = Transition.default, bearingImageSize: BearingImageSize = BearingImageSize.default, bearingImageSizeTransition: Transition = Transition.default, emphasisCircleColor: EmphasisCircleColor = EmphasisCircleColor.default, emphasisCircleColorTransition: Transition = Transition.default, emphasisCircleRadius: EmphasisCircleRadius = EmphasisCircleRadius.default, emphasisCircleRadiusTransition: Transition = Transition.default, imagePitchDisplacement: ImagePitchDisplacement = ImagePitchDisplacement.default, location: Location = Location.default, locationTransition: Transition = Transition.default, locationIndicatorOpacity: LocationIndicatorOpacity = LocationIndicatorOpacity.default, locationIndicatorOpacityTransition: Transition = Transition.default, perspectiveCompensation: PerspectiveCompensation = PerspectiveCompensation.default, shadowImageSize: ShadowImageSize = ShadowImageSize.default, shadowImageSizeTransition: Transition = Transition.default, topImageSize: TopImageSize = TopImageSize.default, topImageSizeTransition: Transition = Transition.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

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.

accuracyRadiusBorderColor

The color for drawing the accuracy radius border. To adjust transparency, set the alpha component of the color accordingly.

accuracyRadiusColor

The color for drawing the accuracy radius, as a circle. To adjust transparency, set the alpha component of the color accordingly.

bearing

The bearing of the location indicator.

bearingImageSize

The size of the bearing image, as a scale factor applied to the size of the specified image.

emphasisCircleColor

The color of the circle emphasizing the indicator. To adjust transparency, set the alpha component of the color accordingly.

emphasisCircleRadius

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

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.

location

An array of latitude, longitude, altitude position of the location indicator.

locationIndicatorOpacity

The opacity of the entire location indicator layer.

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.

shadowImageSize

The size of the shadow image, as a scale factor applied to the size of the specified image.

topImageSize

The size of the top image, as a scale factor applied to the size of the specified image.

visibility

Whether this layer is displayed.

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

maxZoom

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

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.