forked from maplibre/maplibre-native-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_Style.qml
57 lines (47 loc) · 1.3 KB
/
example_Style.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
import QtQuick 2.15
import QtLocation 6.5
import QtPositioning 6.5
import MapLibre 3.0
Item {
width: 512
height: 512
Plugin {
id: mapPlugin
name: "maplibre"
PluginParameter {
name: "maplibre.map.styles"
value: "https://demotiles.maplibre.org/style.json"
}
}
MapView {
id: mapView
anchors.fill: parent
map.plugin: mapPlugin
map.zoomLevel: 5
map.center: QtPositioning.coordinate(41.874, -75.789)
MapLibre.style: Style {
id: style
SourceParameter {
id: radarSourceParam
styleId: "radar"
type: "image"
property string url: "https://maplibre.org/maplibre-gl-js/docs/assets/radar1.gif"
property var coordinates: [
[-80.425, 46.437],
[-71.516, 46.437],
[-71.516, 37.936],
[-80.425, 37.936]
]
}
LayerParameter {
id: radarLayerParam
styleId: "radar-layer"
type: "raster"
property string source: "radar"
paint: {
"raster-opacity": 0.9
}
}
}
}
}