From 5cb1d28861437172887952db447f324aa56ce8a4 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 2 Aug 2017 00:51:09 +0300 Subject: mapwidget.qml: use a custom built googlemaps plugin This patch makes use of the geolocation plugin "googlemaps" for Qt Location with source code from here: https://github.com/vladest/googlemaps The change from the ESRI plugin is that it requires new indexes for the Hybrid ([3]) and Street ([0]) map types. There are more zoom levels in this plugins, but our default zoom-in settings seem to transition well to it. Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 28975ee12..3c948a334 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -9,7 +9,7 @@ Item { Plugin { id: mapPlugin - name: "esri" + name: "googlemaps" } MapWidgetHelper { @@ -27,7 +27,7 @@ Item { plugin: mapPlugin zoomLevel: 1 - readonly property var mapType: { "STREET": supportedMapTypes[0], "SATELLITE": supportedMapTypes[1] } + readonly property var mapType: { "STREET": supportedMapTypes[0], "SATELLITE": supportedMapTypes[3] } readonly property var defaultCenter: QtPositioning.coordinate(0, 0) readonly property real defaultZoomIn: 12.0 readonly property real defaultZoomOut: 1.0 -- cgit v1.2.3-70-g09d2 From ca37301cb57677fafaa856ae2fba91276fba9753 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 2 Aug 2017 22:59:02 +0300 Subject: build.sh: build the google maps geoservices plugin The source code is pulled from the forked repository at: git@github.com:Subsurface-divelog/googlemaps.git It's rebased if needed, build using 'make -j4' and then installed. Signed-off-by: Lubomir I. Ivanov --- scripts/build.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index 945673bf8..a5c1f0fff 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -429,7 +429,22 @@ else fi +# build the googlemaps map plugin +cd $SRC +if [ ! -d googlemaps ] ; then + if [[ $1 = local ]] ; then + git clone $SRC/../googlemaps googlemaps + else + git clone git@github.com:Subsurface-divelog/googlemaps.git + fi +fi +cd googlemaps +git checkout master +git pull --rebase +qmake +make -j4 +make install # finally, build Subsurface -- cgit v1.2.3-70-g09d2 From e05abca7e03953df77bdb46d225c853fe73f55f7 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 2 Aug 2017 23:37:00 +0300 Subject: mxe-based-build.sh: copy a googlemaps plugin instead of esri This would work only if the folder: $BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/plugins/geoservices contains such a file. Signed-off-by: Lubomir I. Ivanov --- packaging/windows/mxe-based-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/windows/mxe-based-build.sh b/packaging/windows/mxe-based-build.sh index 19fd3c07d..08b742c25 100755 --- a/packaging/windows/mxe-based-build.sh +++ b/packaging/windows/mxe-based-build.sh @@ -273,7 +273,7 @@ do mkdir -p $STAGING_TESTS_DIR/$(basename $d) for f in $d/* do - if [[ "$d" =~ geoservice ]] && [[ ! "$f" =~ esri ]] ; then + if [[ "$d" =~ geoservice ]] && [[ ! "$f" =~ googlemaps ]] ; then continue fi if [[ "$RELEASE" == "Release" ]] && ([[ ! -f ${f//d.dll/.dll} || "$f" == "${f//d.dll/.dll}" ]]) ; then -- cgit v1.2.3-70-g09d2