From c1c3c5456f6ace6bd1030aa6814ada6756363434 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Fri, 1 Jan 2021 19:56:00 +0100 Subject: [PATCH] Switch to OSM classic style - as mapbox was not detailed enough --- assets/main.qml | 73 +++++++++++++++++++++++++-------------------- main.pyproject.user | 5 ++-- 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/assets/main.qml b/assets/main.qml index 0b4f6f5..5abbedd 100644 --- a/assets/main.qml +++ b/assets/main.qml @@ -28,12 +28,17 @@ ApplicationWindow { Plugin { id: mapPlugin - name: "mapboxgl" // "mapboxgl", "esri", ... + name: "osm" // "mapboxgl", "esri", ... // specify plugin parameters if necessary - PluginParameter { - name: "access_token" - value: "pk.eyJ1Ijoia3ViYS1vcmxpayIsImEiOiJja2plYzc3bjYyaW8yMnhydXNsY2FxdTFhIn0.Qi8QihmbMcxfvoOXaQ7PxQ" - } + // that's for mapbox: +// PluginParameter { +// name: "access_token" +// value: "pk.eyJ1Ijoia3ViYS1vcmxpayIsImEiOiJja2plYzc3bjYyaW8yMnhydXNsY2FxdTFhIn0.Qi8QihmbMcxfvoOXaQ7PxQ" +// } + PluginParameter{ + name: "osm.mapping.custom.host" + value: "https://tile.openstreetmap.org/" + } } Map { @@ -41,34 +46,36 @@ ApplicationWindow { plugin: mapPlugin id: map center: QtPositioning.coordinate(52.397445910207296, 16.90215638925963) // PoznaƄ - zoomLevel: 14 - - MapParameter { - type: "layer" - - property var name: "3d-buildings" - property var source: "composite" - property var sourceLayer: "building" - property var layerType: "fill-extrusion" - property var minzoom: 15.0 - } - - MapParameter { - type: "filter" - - property var layer: "3d-buildings" - property var filter: [ "==", "extrude", "true" ] - } - - MapParameter { - type: "paint" - - property var layer: "3d-buildings" - property var fillExtrusionColor: "#aaaaaa" - property var fillExtrusionOpacity: .6 - property var fillExtrusionHeight: { return { type: "identity", property: "height" } } - property var fillExtrusionBase: { return { type: "identity", property: "min_height" } } - } + zoomLevel: 16 + maximumZoomLevel: 19 + activeMapType: supportedMapTypes[supportedMapTypes.length - 1] + +// MapParameter { +// type: "layer" + +// property var name: "3d-buildings" +// property var source: "composite" +// property var sourceLayer: "building" +// property var layerType: "fill-extrusion" +// property var minzoom: 15.0 +// } + +// MapParameter { +// type: "filter" + +// property var layer: "3d-buildings" +// property var filter: [ "==", "extrude", "true" ] +// } + +// MapParameter { +// type: "paint" + +// property var layer: "3d-buildings" +// property var fillExtrusionColor: "#aaaaaa" +// property var fillExtrusionOpacity: .6 +// property var fillExtrusionHeight: { return { type: "identity", property: "height" } } +// property var fillExtrusionBase: { return { type: "identity", property: "min_height" } } +// } MapQuickItem { id:marker diff --git a/main.pyproject.user b/main.pyproject.user index 98be079..a83ded2 100644 --- a/main.pyproject.user +++ b/main.pyproject.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -242,12 +242,11 @@ pin64 PythonEditor.RunConfiguration./home/kuba/projects/personal/qt-map-py/pin64.png /home/kuba/projects/personal/qt-map-py/pin64.png - /home/kuba/projects/personal/qt-map-py/pin64.png + {321e7b37-1298-486f-a795-84810b9a4c52} false true false true - /home/kuba/projects/personal/qt-map-py 2