I want to draw line. But, I can't
Where I mistake?
My code:
import QtQuick 2.6
import QtQuick.Controls 2.2
import Esri.ArcGISRuntime 100.9
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "MapTest2"
// add a mapView component
MapView {
id: mapView
anchors.fill: parent
// set focus to enable keyboard navigation
focus: true
// add a map to the mapview
Map {
// add the BasemapTopographic basemap to the map
BasemapTopographic {}
}
onMouseClicked: {
pointBuilder.points.addPointXY(0, 35)
pointBuilder.points.addPointXY(135, 35)
lineBuilder.points.addPointXY(0, 35)
lineBuilder.points.addPointXY(135, 35)
pointA.geometry = pointBuilder.geometry
lineA.geometry = lineBuilder.geometry
}
GraphicsOverlay {
id: overlay
Graphic {
id: pointA
zIndex: 2
SimpleMarkerSymbol {
color: "red"
size: 15
style: Enums.SimpleMarkerSymbolStyleCircle
}
}
Graphic{
id: lineA
zIndex: 1
SimpleLineSymbol {
id: simpleLineSymbol
style: Enums.SimpleLineSymbolStyleDash
width: 10
color: "green"
}
}
}
MultipointBuilder{
id: pointBuilder
spatialReference: SpatialReference {
wkid: 6668
}
}
MultipointBuilder{
id: lineBuilder
spatialReference: SpatialReference {
wkid: 6668
}
}
}
}
This code can draw point.