mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 05:23:24 +00:00
mapwidget.qml: implement the MapItemView with delegate
MapItemView is the QML class that handles the "create map markers based on a model". In this case the model is created as part of the MapWidgetHelper, so here passing "mapHelper.model" to the "model" property is enough. The delegate receives coordinates from the model as "model.latitude", "model.logitude" and converts them to QGeoCoordinate. The "sourceItem" image for the delagete is just an image ATM and is fetched from QRC. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
f4e6df475e
commit
d783984443
1 changed files with 12 additions and 0 deletions
|
@ -30,6 +30,18 @@ Item {
|
|||
map.activeMapType = map.supportedMapTypes[esriMapTypeIndexes.SATELLITE];
|
||||
}
|
||||
|
||||
MapItemView {
|
||||
id: mapItemView
|
||||
|
||||
model: mapHelper.model
|
||||
delegate: MapQuickItem {
|
||||
anchorPoint.x: 0
|
||||
anchorPoint.y: mapItemImage.height
|
||||
coordinate: QtPositioning.coordinate(latitude, longitude)
|
||||
sourceItem: Image { id: mapItemImage; source: "qrc:///mapwidget-marker-image" }
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
id: mapAnimation
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue