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
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];
}
}
}