The polyline builder allows you to create and modify Polyline geometries incrementally. More...
Public Functions PolylineBuilder(const Esri::ArcGISRuntime::Polyline &polyline, QObject *parent = nullptr) PolylineBuilder(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr) virtual ~PolylineBuilder() override Esri::ArcGISRuntime::Polyline toPolyline() const Reimplemented Public Functions virtual Esri::ArcGISRuntime::GeometryBuilderType geometryBuilderType() const override virtual Esri::ArcGISRuntime::Geometry toGeometry() const override Detailed DescriptionPolyline geometries are immutable and cannot be changed directly once created. The polyline builder allows you to change the contents of the shape by using the mutable PartCollection that is accessible from MultipartBuilder::parts. Each Part, in the collection, comprises a collection of segments that make the Part. You can add or remove a Part from the PartCollection, or you can create a new or edit the segment vertices of an existing Part. Use GeometryBuilder::toGeometry to return the new Polyline from the builder.
// create a PolylineBuilder and a single-part polyline auto* builder = new PolylineBuilder(SpatialReference(4326), this); builder->addPoint(-117.0, 34.0); builder->addPoint(-118.0, 34.0); Polyline singleLine = builder->toPolyline(); // create a multi-part polyline using the same PolylineBuilder Part* part1 = new Part(builder->spatialReference(), this); Part* part2 = new Part(builder->spatialReference(), this); part1->addPoint(-116.0, 33.0); part1->addPoint(-116.5, 33.5); part2->addPoint(-115.0, 33.0); part2->addPoint(-115.5, 33.5); auto* pCollection = new PartCollection(builder->spatialReference(), this); pCollection->addPart(part1); pCollection->addPart(part2); builder->setParts(pCollection); Polyline multiPart = builder->toPolyline();
Relevant samples:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4