FeatureGroup

data class FeatureGroup<T : Any>(val space: CoordinateSpace<T>, val featureMap: SnapshotStateMap<String, Feature<T>> = mutableStateMapOf()) : CoordinateSpace<T> , Feature<T>

A group of other features

Constructors

Link copied to clipboard
constructor(space: CoordinateSpace<T>, featureMap: SnapshotStateMap<String, Feature<T>> = mutableStateMapOf())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val attributes: Attributes
Link copied to clipboard
val Feature<*>.color: Color?
Link copied to clipboard
open override val defaultViewPoint: ViewPoint<T>

A view point used by default

Link copied to clipboard
val featureMap: SnapshotStateMap<String, Feature<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val space: CoordinateSpace<T>
Link copied to clipboard
val Feature<*>.z: Float
Link copied to clipboard

Functions

Link copied to clipboard
fun <T : Any> FeatureGroup<T>.arc(oval: Rectangle<T>, startAngle: Angle, arcLength: Angle, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, ArcFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.circle(center: T, size: Dp = 5.dp, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, CircleFeature<T>>
Link copied to clipboard
open override fun T.distanceTo(b: T, zoom: Float): Dp
Link copied to clipboard
open override fun T.distanceToLine(a: T, b: T, zoom: Float): Dp
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "draggableMultiLineFromPoints")
fun <T : Any> FeatureGroup<T>.draggableMultiLine(points: List<T>, id: String? = null): FeatureRef<T, MultiLineFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.draw(position: T, attributes: Attributes = Attributes.EMPTY, id: String? = null, draw: DrawScope.() -> Unit): FeatureRef<T, DrawFeature<T>>
Link copied to clipboard
fun <F : Feature<T>> feature(id: String?, feature: F): FeatureRef<T, F>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.forEach(visitor: FeatureGroup<T>.(id: String, feature: Feature<T>) -> Unit)

Recursively visit all features in this group

Link copied to clipboard
fun <T : Any> FeatureGroup<T>.forEachUntil(visitor: FeatureGroup<T>.(id: String, feature: Feature<T>) -> Boolean)

Recursively search for feature until function returns true

Link copied to clipboard
fun <T : Any, A> FeatureGroup<T>.forEachWithAttribute(key: Attribute<A>, block: FeatureGroup<T>.(id: String, feature: Feature<T>, attributeValue: A) -> Unit)

Process all features with a given attribute from the one with highest z to lowest

Link copied to clipboard
fun <T : Any, A> FeatureGroup<T>.forEachWithAttributeUntil(key: Attribute<A>, block: FeatureGroup<T>.(id: String, feature: Feature<T>, attributeValue: A) -> Boolean)
Link copied to clipboard
inline fun <T : Any, F : Feature<T>> FeatureGroup<T>.forEachWithType(crossinline block: (FeatureRef<T, F>) -> Unit)
Link copied to clipboard
inline fun <T : Any, F : Feature<T>> FeatureGroup<T>.forEachWithTypeUntil(crossinline block: (FeatureRef<T, F>) -> Boolean)
Link copied to clipboard
open override fun getBoundingBox(zoom: Float): Rectangle<T>?
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.group(id: String? = null, builder: FeatureGroup<T>.() -> Unit): FeatureRef<T, FeatureGroup<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.icon(position: T, image: ImageVector, size: DpSize = DpSize(image.defaultWidth, image.defaultHeight), attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, VectorIconFeature<T>>
Link copied to clipboard
open override fun T.isInsidePolygon(points: List<T>): Boolean
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.line(aCoordinates: T, bCoordinates: T, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, LineFeature<T>>
Link copied to clipboard
open override fun ViewPoint<T>.moveBy(delta: T): ViewPoint<T>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.multiLine(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, MultiLineFeature<T>>
Link copied to clipboard
open override fun T.offsetTo(b: T, zoom: Float): DpOffset
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.pixelMap(rectangle: Rectangle<T>, pixelMap: Structure2D<Color?>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, PixelMapFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.points(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, PointsFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.polygon(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, PolygonFeature<T>>
Link copied to clipboard
open override fun Rectangle(first: T, second: T): Rectangle<T>

Build a rectangle by two opposing corners

open override fun Rectangle(center: T, zoom: Float, size: DpSize): Rectangle<T>

Build a rectangle of visual size size

Link copied to clipboard
fun <T : Any> CoordinateSpace<T>.Rectangle(viewPoint: ViewPoint<T>, size: DpSize): Rectangle<T>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.rectangle(centerCoordinates: T, size: DpSize = DpSize(5.dp, 5.dp), attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, RectangleFeature<T>>
Link copied to clipboard
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.scalableImage(box: Rectangle<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null, painter: @Composable () -> Painter): FeatureRef<T, ScalableImageFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureGroup<T>.text(position: T, text: String, font: Font.() -> Unit = { size = 16f }, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, TextFeature<T>>
Link copied to clipboard

Create a pretty tree-like representation of this feature group

Link copied to clipboard
open override fun ViewPoint(center: T, zoom: Float): ViewPoint<T>

Create a ViewPoint associated with this coordinate space.

Link copied to clipboard
open override fun withAttributes(modify: Attributes.() -> Attributes): Feature<T>
Link copied to clipboard
open override fun Rectangle<T>.withCenter(center: T): Rectangle<T>

Move given rectangle to be centered at center

Link copied to clipboard
open override fun Collection<T>.wrapPoints(): Rectangle<T>?
Link copied to clipboard
open override fun Collection<Rectangle<T>>.wrapRectangles(): Rectangle<T>?
Link copied to clipboard
open override fun ViewPoint<T>.zoomBy(zoomDelta: Float, invariant: T): ViewPoint<T>