summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-16 00:56:54 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commitccaaff42a39d65328e43c812ec4b2d0d68a651bd (patch)
tree0e843579e19429a79c2a00fb1841933f3627d436
parenta8af2f5548e8c2a9c0d59062faf2fdeeab5a5d65 (diff)
downloadsubsurface-ccaaff42a39d65328e43c812ec4b2d0d68a651bd.tar.gz
mapwidget.qml: enumerate the ESRI map types of interest
Add a local "enumeration" (object) for the two possibly map types of interest: SATELLITE and STREET. Use SATELLITE by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
-rw-r--r--mobile-widgets/qml/MapWidget.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index f7b010c62..4645f00c7 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -3,14 +3,22 @@ import QtLocation 5.3
import QtPositioning 5.3
Item {
+
+ readonly property var esriMapTypeIndexes: { "STREET": 0, "SATELLITE": 1 };
+
Plugin {
id: mapPlugin
name: "esri"
}
Map {
+ id: map
anchors.fill: parent
plugin: mapPlugin
zoomLevel: 1
+
+ Component.onCompleted: {
+ map.activeMapType = map.supportedMapTypes[esriMapTypeIndexes.SATELLITE];
+ }
}
}