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>
This commit is contained in:
Lubomir I. Ivanov 2017-07-16 00:56:54 +03:00 committed by Dirk Hohndel
parent a8af2f5548
commit ccaaff42a3

View file

@ -3,14 +3,22 @@ import QtLocation 5.3
import QtPositioning 5.3 import QtPositioning 5.3
Item { Item {
readonly property var esriMapTypeIndexes: { "STREET": 0, "SATELLITE": 1 };
Plugin { Plugin {
id: mapPlugin id: mapPlugin
name: "esri" name: "esri"
} }
Map { Map {
id: map
anchors.fill: parent anchors.fill: parent
plugin: mapPlugin plugin: mapPlugin
zoomLevel: 1 zoomLevel: 1
Component.onCompleted: {
map.activeMapType = map.supportedMapTypes[esriMapTypeIndexes.SATELLITE];
}
} }
} }