PolylineBuilder QML Type

  • Esri.ArcGISRuntime
  • PolylineBuilder
  • Helper type for building immutable Polyline geometries. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0



    Detailed Description

    The spatial reference must be set before using the builder and cannot be changed after the builder contains parts. The initial shape stored in the builder can be assigned by using the geometry property. Change the contents of the shape by using the mutable PartCollection accessible from the parts property. Use the geometry property to get the immutable Polyline from the current state of this builder.

    You can declare a PolylineBuilder and specify its spatial reference.

    PolylineBuilder {
        id: polylineBuilderWGS84
        spatialReference: SpatialReference { wkid: 4326 }

    Then, use the builder to create as many polylines as you wish. Here, it is used to create a single-part polyline.

    polylineBuilderWGS84.addPointXY(-117.0, 34.0);
    polylineBuilderWGS84.addPointXY(-116.0, 34.0);
    polylineBuilderWGS84.addPointXY(-116.0, 35.0);
    var polyline1 = polylineBuilderWGS84.geometry;

    Property Documentation

    parts : PartCollection

    The part collection that this builder is constructing or modifying.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.