From ccaaff42a39d65328e43c812ec4b2d0d68a651bd Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 16 Jul 2017 00:56:54 +0300 Subject: 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 --- mobile-widgets/qml/MapWidget.qml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mobile-widgets/qml') 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]; + } } } -- cgit v1.2.3-70-g09d2