-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Marker.qml
72 lines (61 loc) · 1.27 KB
/
Marker.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import QtQuick
import QtQuick.Controls
import QtQuick.Shapes
import org.qfield
import org.qgis
import Theme
Shape {
id: marker
property alias sourcePosition: _cts.sourcePosition
property alias sourceCrs: _cts.sourceCrs
property alias destinationCrs: _cts.destinationCrs
property color fillColor: "gray"
property CoordinateTransformer ct: CoordinateTransformer {
id: _cts
transformContext: qgisProject ? qgisProject.transformContext : CoordinateReferenceSystemUtils.emptyTransformContext()
}
MapToScreen {
id: mapToScreenStart
mapSettings: mapCanvas.mapSettings
mapPoint: _cts.projectedPosition
}
x: mapToScreenStart.screenPoint.x - width / 2
y: mapToScreenStart.screenPoint.y - height + 4
width: 36
height: 40
ShapePath {
strokeWidth: 3
strokeColor: "white"
strokeStyle: ShapePath.SolidLine
joinStyle: ShapePath.MiterJoin
fillColor: marker.fillColor
startX: 6
startY: 16
PathArc {
x: 30
y: 16
radiusX: 12
radiusY: 14
}
PathArc {
x: 18
y: 36
radiusX: 36
radiusY: 36
}
PathArc {
x: 6
y: 16
radiusX: 36
radiusY: 36
}
}
Rectangle {
x: 13
y: 9
width: 10
height: 10
color: "white"
radius: 4
}
}