Open Pioneer Trails Packages
    Preparing search index...

    Interface MeasurementProps

    Properties supported by the Measurement component.

    interface MeasurementProps {
        activeFeatureStyle?: StyleLike;
        finishedFeatureStyle?: StyleLike;
        map?: MapModel;
        onMeasurementsChange?: (event: MeasurementsChangeEvent) => void;
        predefinedMeasurements?: MeasurementGeometry[];
        [key: `data-${string}`]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: `data-${string}`]: unknown

      Arbitrary data attributes.

      NOTE: The component may use data properties for its own behavior. Make sure not to overwrite required attributes.

    Index
    activeFeatureStyle?: StyleLike

    The style for the active drawing feature's geometry.

    finishedFeatureStyle?: StyleLike

    The style for the finished drawn feature's geometry.

    map?: MapModel

    The map model to use.

    onMeasurementsChange?: (event: MeasurementsChangeEvent) => void

    Event handler that is called whenever a measurement is added or removed.

    predefinedMeasurements?: MeasurementGeometry[]

    Measurement geometries that are rendered in addition to the measurements drawn by the user.

    The measurements are re-applied whenever the array changes, so keep the array stable (for example with useMemo) to avoid needless updates.