[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/rinigus/pure-maps.git</param>
<param name="branch">master</param>
- <param name="revision">2.9.2</param>
+ <param name="revision">3.0.0</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-pure-maps-2.9.2.tar.xz/packaging/click/full-build.json
^
|
@@ -1,99 +0,0 @@
-{
- "clickable_minimum_required": "6.24",
- "builder": "cmake",
- "kill": "pure-maps",
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ],
- "build_args": [
- "-DFLAVOR=uuitk",
- "-DAPP_NAME=pure-maps.jonnius",
- "-DS2INCLUDES=${S2GEOMETRY_LIB_INSTALL_DIR}/include",
- "-DS2LIBS=${S2GEOMETRY_LIB_INSTALL_DIR}/lib"
- ],
- "postbuild": "sed -i 's/@APP_TITLE@/Pure Maps/g' ${INSTALL_DIR}/manifest.json && sed -i 's/@APP_TITLE@/Pure Maps/g' ${INSTALL_DIR}/pure-maps.desktop && sed -i 's/@APP_NAME@/pure-maps/g' ${INSTALL_DIR}/manifest.json && mv ${INSTALL_DIR}/bin/pure-maps.jonnius ${CLICK_PATH}/pure-maps",
- "install_data": {
- "${ROOT}/packaging/click/pure-maps.desktop": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/manifest.json": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/pure-maps.apparmor": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/pure-maps.svg": "${INSTALL_DIR}",
- "${PICOTTS_LIB_INSTALL_DIR}/usr/share/picotts": "${INSTALL_DIR}/usr/share"
- },
- "install_bin": [
- "${MIMIC_LIB_INSTALL_DIR}/bin/mimic",
- "${PICOTTS_LIB_INSTALL_DIR}/usr/bin/pico2wave"
- ],
- "install_lib": [
- "${MAPBOX_GL_NATIVE_LIB_INSTALL_DIR}/lib/*.so*",
- "${MAPBOX_GL_QML_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/qt5/qml/*",
- "${S2GEOMETRY_LIB_INSTALL_DIR}/lib/*.so*"
- ],
- "scripts": {
- "prepare-deps": "git submodule update --recursive --init && ${ROOT}/packaging/click/prepare-deps.sh"
- },
- "libraries": {
- "mapbox-gl-native": {
- "builder": "cmake",
- "build_args": [
- "-DMBGL_WITH_QT=ON",
- "-DMBGL_WITH_WERROR=OFF",
- "-DMBGL_WITH_QT_HEADLESS=OFF",
- "-DMBGL_WITH_QT_TEST=OFF",
- "-DMBGL_WITH_QT_DEMO=OFF"
- ],
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ]
- },
- "mapbox-gl-qml": {
- "builder": "qmake",
- "build_args": [
- "INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include",
- "INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include/qt5",
- "LIBS+=-L${BUILD_DIR}/../mapbox-gl-native/install/lib"
- ]
- },
- "s2geometry": {
- "builder": "cmake",
- "build_args": [
- "-DBUILD_PYTHON=OFF",
- "-DBUILD_TESTING=OFF",
- "-DBUILD_SHARED_LIBS=ON",
- "-DBUILD_EXAMPLES=OFF"
- ],
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ],
- "dependencies_target": [
- "swig",
- "libpython3-dev"
- ]
- },
- "mimic": {
- "builder": "custom",
- "build": "cp -r ${SRC_DIR}/* ${BUILD_DIR} && ./autogen.sh && ./configure --with-audio=none --prefix=${INSTALL_DIR} --exec-prefix=${INSTALL_DIR} --host=${ARCH_TRIPLET} && make -j4 && make install",
- "dependencies_target": [
- "libtool",
- "libasound2-dev",
- "libpcre2-dev"
- ]
- },
- "picotts": {
- "builder": "custom",
- "build": "cp -r ${SRC_DIR}/* ${BUILD_DIR} && DESTDIR=${INSTALL_DIR} LANG_DIR=./usr/share/picotts/lang make -j4 && DESTDIR=${INSTALL_DIR} make install",
- "dependencies_target": [
- "libtool",
- "libpopt-dev"
- ]
- }
- }
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-pure-maps-2.9.2.tar.xz/packaging/click/slim-build.json
^
|
@@ -1,89 +0,0 @@
-{
- "clickable_minimum_required": "6.24",
- "builder": "cmake",
- "kill": "pure-maps",
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ],
- "build_args": [
- "-DFLAVOR=uuitk",
- "-DAPP_NAME=pure-maps-slim.jonnius",
- "-DS2INCLUDES=${S2GEOMETRY_LIB_INSTALL_DIR}/include",
- "-DS2LIBS=${S2GEOMETRY_LIB_INSTALL_DIR}/lib"
- ],
- "postbuild": "sed -i 's/@APP_TITLE@/Pure Maps Slim/g' ${INSTALL_DIR}/manifest.json && sed -i 's/@APP_TITLE@/Pure Maps Slim/g' ${INSTALL_DIR}/pure-maps.desktop && sed -i 's/@APP_NAME@/pure-maps-slim/g' ${INSTALL_DIR}/manifest.json && mv ${INSTALL_DIR}/bin/pure-maps-slim.jonnius ${CLICK_PATH}/pure-maps",
- "install_data": {
- "${ROOT}/packaging/click/pure-maps.desktop": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/manifest.json": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/pure-maps.apparmor": "${INSTALL_DIR}",
- "${ROOT}/packaging/click/pure-maps.svg": "${INSTALL_DIR}",
- "${PICOTTS_LIB_INSTALL_DIR}/usr/share/picotts": "${INSTALL_DIR}/usr/share"
- },
- "install_bin": [
- "${PICOTTS_LIB_INSTALL_DIR}/usr/bin/pico2wave"
- ],
- "install_lib": [
- "${MAPBOX_GL_NATIVE_LIB_INSTALL_DIR}/lib/*.so*",
- "${MAPBOX_GL_QML_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/qt5/qml/*",
- "${S2GEOMETRY_LIB_INSTALL_DIR}/lib/*.so*"
- ],
- "scripts": {
- "prepare-deps": "git submodule update --recursive --init && ENABLE_MIMIC=0 ${ROOT}/packaging/click/prepare-deps.sh"
- },
- "libraries": {
- "mapbox-gl-native": {
- "builder": "cmake",
- "build_args": [
- "-DMBGL_WITH_QT=ON",
- "-DMBGL_WITH_WERROR=OFF",
- "-DMBGL_WITH_QT_HEADLESS=OFF",
- "-DMBGL_WITH_QT_TEST=OFF",
- "-DMBGL_WITH_QT_DEMO=OFF"
- ],
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ]
- },
- "mapbox-gl-qml": {
- "builder": "qmake",
- "build_args": [
- "INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include",
- "INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include/qt5",
- "LIBS+=-L${BUILD_DIR}/../mapbox-gl-native/install/lib"
- ]
- },
- "s2geometry": {
- "builder": "cmake",
- "build_args": [
- "-DBUILD_PYTHON=OFF",
- "-DBUILD_TESTING=OFF",
- "-DBUILD_SHARED_LIBS=ON",
- "-DBUILD_EXAMPLES=OFF"
- ],
- "dependencies_ppa": [
- "ppa:janisozaur/cmake-update"
- ],
- "dependencies_host": [
- "cmake"
- ],
- "dependencies_target": [
- "swig",
- "libpython3-dev"
- ]
- },
- "picotts": {
- "builder": "custom",
- "build": "cp -r ${SRC_DIR}/* ${BUILD_DIR} && DESTDIR=${INSTALL_DIR} LANG_DIR=./usr/share/picotts/lang make -j4 && DESTDIR=${INSTALL_DIR} make install",
- "dependencies_target": [
- "libtool",
- "libpopt-dev"
- ]
- }
- }
-}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/.tx/config
^
|
@@ -1,8 +1,9 @@
[main]
host = https://www.transifex.com
-[pure-maps.pure-mapspot]
+[o:rinigus:p:pure-maps:r:pure-mapspot]
file_filter = po/<lang>.po
source_file = po/pure-maps.pot
source_lang = en
-type = PO
+type = PO
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/CMakeLists.txt
^
|
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 3.5.1) # Latest version as supported by Ubuntu Touch
project(pure-maps
- VERSION 2.9.2
+ VERSION 3.0.0
DESCRIPTION "Maps and navigation")
# options
set(APP_NAME "" CACHE STRING "Name of the application, specify if custom name is needed")
+set(APP_REV_NAME "" CACHE STRING "Name of the application used for data files, specify if custom name is needed")
set(FLAVOR "kirigami" CACHE STRING "Platform to build support for. Supported platforms: kirigami, silica, qtcontrols, uuitk")
set(PYTHON_EXE "auto" CACHE STRING "Set python3 executable. If set to 'auto', cmake will try to find it.")
option(RUN_FROM_SOURCE "Run from source, this is mainly intended for easy development" OFF)
@@ -65,6 +66,15 @@
set(APP_NAME harbour-pure-maps)
else()
set(APP_NAME pure-maps)
+ set(APP_REV_NAME io.github.rinigus.PureMaps)
+ endif()
+endif()
+
+if(NOT APP_REV_NAME)
+ if(FLAVOR STREQUAL "silica")
+ set(APP_REV_NAME harbour-pure-maps)
+ else()
+ set(APP_REV_NAME io.github.rinigus.PureMaps)
endif()
endif()
@@ -175,18 +185,18 @@
# appdata
install(FILES packaging/pure-maps.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
- RENAME ${APP_NAME}.appdata.xml)
+ RENAME ${APP_REV_NAME}.appdata.xml)
# desktop files
if(NOT FLAVOR STREQUAL "silica")
- configure_file(data/pure-maps.desktop.in ${APP_NAME}.desktop @ONLY)
+ configure_file(data/pure-maps.desktop.in ${APP_REV_NAME}.desktop @ONLY)
configure_file(data/pure-maps-uri-handler.desktop.in ${APP_NAME}-uri-handler.desktop @ONLY)
set(DESKTOP_SRC
- ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME}.desktop
+ ${CMAKE_CURRENT_BINARY_DIR}/${APP_REV_NAME}.desktop
${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME}-uri-handler.desktop)
else()
set(DESKTOP_SRC
- data/${APP_NAME}.desktop
+ data/${APP_REV_NAME}.desktop
data/${APP_NAME}-uri-handler.desktop)
endif()
@@ -196,7 +206,7 @@
# icons
set(ICON_SIZES 108 128 256 86)
foreach(_ISIZE ${ICON_SIZES})
- install(FILES data/pure-maps-${_ISIZE}.png RENAME ${APP_NAME}.png
+ install(FILES data/pure-maps-${_ISIZE}.png RENAME ${APP_REV_NAME}.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${_ISIZE}x${_ISIZE}/apps)
endforeach()
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/NEWS.md
^
|
@@ -1,3 +1,14 @@
+2022-03-16: Pure Maps 3.0.0
+============================
+
+* Switch over to Maplibre Native GL based plugin
+* Show traffic impact on route
+* Update route traffic info while routing
+* Switch to SVG based map icons
+* Notify the changes in positioning precision during navigation
+* Update build scripts [pabloyoyoista]
+* Update Ubuntu Touch build scripts [jonnius]
+
2021-11-22: Pure Maps 2.9.0
===========================
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/data/pure-maps-uri-handler.desktop.in
^
|
@@ -2,6 +2,6 @@
Name=Pure Maps Uri Handler
MimeType=x-scheme-handler/geo
Exec=@CMAKE_INSTALL_FULL_BINDIR@/@APP_NAME@ %u
-Icon=@APP_NAME@
+Icon=@APP_REV_NAME@
Type=Application
NoDisplay=true
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/data/pure-maps.desktop.in
^
|
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Pure Maps
Exec=@CMAKE_INSTALL_FULL_BINDIR@/@APP_NAME@ %u
-Icon=@APP_NAME@
+Icon=@APP_REV_NAME@
Type=Application
MimeType=x-scheme-handler/geo
X-Ubuntu-Touch=true
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/click/README.md
^
|
@@ -2,20 +2,20 @@
## Preparations
-Install [Clickable](http://clickable.bhdouglass.com/en/latest/install.html)
+Install [Clickable](https://clickable-ut.dev/en/latest/install.html)
which is used to build and publish click packages.
-Also copy `tools/apikeys_dummy.py` to `tools/apikeys.py` and fill missing API
+Copy `tools/apikeys_dummy.py` to `tools/apikeys.py` and fill missing API
keys for the services that you plan to use.
Create a symlink to the config file to omit the `-c` flag in all clickable
calls:
- ln -s packaging/click/full-build.json clickable.json
+ ln -s packaging/click/full-build.yaml clickable.yaml
-for the full build including Mimic, resulting in a 98 MB click package, or:
+for the full build including Mimic, resulting in a 100 MB click package, or:
- ln -s packaging/click/slim-build.json clickable.json
+ ln -s packaging/click/slim-build.yaml clickable.yaml
for the slim build without Mimic (but still with PicoTTS), resulting in a 10 MB
click package.
@@ -26,10 +26,10 @@
Run the following command to download and compile the app dependencies:
- clickable prepare-deps
- clickable build-libs --arch armhf # for armhf devices
- clickable build-libs --arch arm64 # for arm64 devices
- clickable build-libs --arch amd64 # for desktop mode
+ clickable script prepare-deps
+ clickable build --libs --arch armhf # for armhf devices
+ clickable build --libs --arch arm64 # for arm64 devices
+ clickable build --libs --arch amd64 # for desktop mode
## Building
@@ -41,15 +41,14 @@
## Debugging
-To debug on a Ubuntu Touch device simply run
+To debug on a Ubuntu Touch device run
- clickable # implies a clean build run, installing on device and launching
- clickable logs # to watch logs
+ clickable chain build install launch logs --arch arm64 # or armhf
-To debug on the desktop run of these:
+To debug in desktop mode run one of these:
- clickable desktop # implies a clean build run
- clickable desktop --dirty # avoid clean before build
- clickable desktop --skip-build # start app without building
+ clickable desktop # implies to build and run
+ clickable desktop --clean # build clean
+ clickable desktop --skip-build # start app without rebuilding
See [Clickable docs](https://clickable-ut.dev/en/latest/) for details.
|
[-]
[+]
|
Added |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/click/full-build.yaml
^
|
@@ -0,0 +1,97 @@
+clickable_minimum_required: 7.0.1
+
+scripts:
+ prepare-deps: git submodule update --recursive --init && ENABLE_MIMIC=1 ${ROOT}/packaging/click/prepare-deps.sh
+
+kill: pure-maps
+
+builder: cmake
+build_args:
+- -DFLAVOR=uuitk
+- -DAPP_NAME=pure-maps.jonnius
+- -DAPP_REV_NAME=pure-maps-slim.jonnius
+- -DS2INCLUDES=${S2GEOMETRY_LIB_INSTALL_DIR}/include
+- -DS2LIBS=${S2GEOMETRY_LIB_INSTALL_DIR}/lib
+postbuild:
+- sed -i 's/@APP_TITLE@/Pure Maps/g' ${INSTALL_DIR}/pure-maps.desktop
+- sed -i 's/@APP_TITLE@/Pure Maps/g' ${INSTALL_DIR}/manifest.json
+- sed -i 's/@APP_NAME@/pure-maps/g' ${INSTALL_DIR}/manifest.json
+- mv ${INSTALL_DIR}/bin/pure-maps.jonnius ${CLICK_PATH}/pure-maps
+dependencies_ppa:
+- ppa:janisozaur/cmake-update
+dependencies_host:
+- cmake
+
+install_lib:
+- ${MAPBOX_GL_NATIVE_LIB_INSTALL_DIR}/lib/*.so*
+- ${MAPBOX_GL_QML_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/qt5/qml/*
+- ${S2GEOMETRY_LIB_INSTALL_DIR}/lib/*.so*
+install_bin:
+- ${MIMIC_LIB_INSTALL_DIR}/bin/mimic
+- ${PICOTTS_LIB_INSTALL_DIR}/usr/bin/pico2wave
+install_root_data:
+- packaging/click/manifest.json
+- packaging/click/pure-maps.apparmor
+- packaging/click/pure-maps.desktop
+- packaging/click/pure-maps.svg
+install_data:
+ ${PICOTTS_LIB_INSTALL_DIR}/usr/share/picotts: usr/share
+
+libraries:
+ mapbox-gl-native:
+ builder: cmake
+ build_args:
+ - -DMBGL_WITH_QT=ON
+ - -DMBGL_WITH_WERROR=OFF
+ - -DMBGL_WITH_QT_HEADLESS=OFF
+ - -DMBGL_WITH_QT_TEST=OFF
+ - -DMBGL_WITH_QT_DEMO=OFF
+ dependencies_ppa:
+ - ppa:janisozaur/cmake-update
+ dependencies_host:
+ - cmake
+
+ mapbox-gl-qml:
+ builder: qmake
+ build_args:
+ - INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include
+ - INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include/qt5
+ - LIBS+=-L${BUILD_DIR}/../mapbox-gl-native/install/lib
+
+ s2geometry:
+ builder: cmake
+ build_args:
+ - -DBUILD_PYTHON=OFF
+ - -DBUILD_TESTING=OFF
+ - -DBUILD_SHARED_LIBS=ON
+ - -DBUILD_EXAMPLES=OFF
+ dependencies_ppa:
+ - ppa:janisozaur/cmake-update
+ dependencies_host:
+ - cmake
+ dependencies_target:
+ - swig
+ - libpython3-dev
+
+ picotts:
+ builder: custom
+ build:
+ - cp -r ${SRC_DIR}/* ${BUILD_DIR}/
+ - DESTDIR=${INSTALL_DIR} LANG_DIR=./usr/share/picotts/lang make -j${NUM_PROCS}
+ - DESTDIR=${INSTALL_DIR} make install
+ dependencies_target:
+ - libtool
+ - libpopt-dev
+
+ mimic:
+ builder: custom
+ build:
+ - cp -r ${SRC_DIR}/* ${BUILD_DIR}
+ - ./autogen.sh
+ - ./configure --with-audio=none --prefix=${INSTALL_DIR} --exec-prefix=${INSTALL_DIR} --host=${ARCH_TRIPLET}
+ - make -j${NUM_PROCS}
+ - make install
+ dependencies_target:
+ - libtool
+ - libasound2-dev
+ - libpcre2-dev
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/click/manifest.json
^
|
@@ -9,7 +9,7 @@
"desktop": "pure-maps.desktop"
}
},
- "version": "2.9.2",
+ "version": "3.0.0",
"maintainer": "Rinigus <rinigus.git@gmail.org>",
"framework" : "@CLICK_FRAMEWORK@"
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/click/prepare-deps.sh
^
|
@@ -5,12 +5,13 @@
set -Eeuo pipefail
-# Setup paths where clickable will look for the sources
ROOT_DIR=$(git rev-parse --show-toplevel)
+CLONE_ARGS="--recursive --shallow-submodules --depth 1"
MAPBOX_GL_NATIVE_SRC_DIR=$ROOT_DIR/libs/mapbox-gl-native
MAPBOX_GL_QML_SRC_DIR=$ROOT_DIR/libs/mapbox-gl-qml
QMLRUNNER_SRC_DIR=$ROOT_DIR/libs/qmlrunner
MIMIC_SRC_DIR=$ROOT_DIR/libs/mimic
+MIMIC_VERSION="1.3.0.1"
PICOTTS_SRC_DIR=$ROOT_DIR/libs/picotts
S2GEOMETRY_SRC_DIR=$ROOT_DIR/libs/s2geometry
@@ -18,15 +19,15 @@
rm -rf $MAPBOX_GL_NATIVE_SRC_DIR $MAPBOX_GL_QML_SRC_DIR $QMLRUNNER_SRC_DIR $MIMIC_SRC_DIR $PICOTTS_SRC_DIR $S2GEOMETRY_SRC_DIR
# Download sources
-git clone -b mapbox-update-200607 https://github.com/rinigus/mapbox-gl-native.git $MAPBOX_GL_NATIVE_SRC_DIR --recurse-submodules --shallow-submodules
-git clone -b 1.7.5 https://github.com/rinigus/mapbox-gl-qml.git $MAPBOX_GL_QML_SRC_DIR
-git clone https://github.com/rinigus/qmlrunner.git $QMLRUNNER_SRC_DIR
-git clone https://github.com/rinigus/s2geometry.git $S2GEOMETRY_SRC_DIR
+git clone -b mapbox-update-200607 ${CLONE_ARGS} https://github.com/rinigus/mapbox-gl-native.git $MAPBOX_GL_NATIVE_SRC_DIR
+git clone -b 1.7.5 ${CLONE_ARGS} https://github.com/rinigus/mapbox-gl-qml.git $MAPBOX_GL_QML_SRC_DIR
+git clone -b 1.0.2 ${CLONE_ARGS} https://github.com/rinigus/qmlrunner.git $QMLRUNNER_SRC_DIR
+git clone -b 0.9.0+git2 ${CLONE_ARGS} https://github.com/rinigus/s2geometry.git $S2GEOMETRY_SRC_DIR
if [ "$ENABLE_MIMIC" == "1" ] ; then
- wget -qO- https://github.com/MycroftAI/mimic1/archive/1.2.0.2.tar.gz | tar -xzv && mv mimic1-1.2.0.2 $MIMIC_SRC_DIR
+ wget -qO- https://github.com/MycroftAI/mimic1/archive/${MIMIC_VERSION}.tar.gz | tar -xzv && mv mimic1-${MIMIC_VERSION} $MIMIC_SRC_DIR
fi
if [ "$ENABLE_PICOTTS" == "1" ] ; then
- git clone https://github.com/jonnius/pkg-picotts.git $PICOTTS_SRC_DIR
+ git clone ${CLONE_ARGS} https://github.com/jonnius/pkg-picotts.git $PICOTTS_SRC_DIR
fi
|
[-]
[+]
|
Added |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/click/slim-build.yaml
^
|
@@ -0,0 +1,83 @@
+clickable_minimum_required: 7.0.1
+
+scripts:
+ prepare-deps: git submodule update --recursive --init && ENABLE_MIMIC=0 ${ROOT}/packaging/click/prepare-deps.sh
+
+kill: pure-maps
+
+builder: cmake
+build_args:
+- -DFLAVOR=uuitk
+- -DAPP_NAME=pure-maps-slim.jonnius
+- -DAPP_REV_NAME=pure-maps-slim.jonnius
+- -DS2INCLUDES=${S2GEOMETRY_LIB_INSTALL_DIR}/include
+- -DS2LIBS=${S2GEOMETRY_LIB_INSTALL_DIR}/lib
+postbuild:
+- sed -i 's/@APP_TITLE@/Pure Maps Slim/g' ${INSTALL_DIR}/pure-maps.desktop
+- sed -i 's/@APP_TITLE@/Pure Maps Slim/g' ${INSTALL_DIR}/manifest.json
+- sed -i 's/@APP_NAME@/pure-maps-slim/g' ${INSTALL_DIR}/manifest.json
+- mv ${INSTALL_DIR}/bin/pure-maps-slim.jonnius ${CLICK_PATH}/pure-maps
+dependencies_ppa:
+- ppa:janisozaur/cmake-update
+dependencies_host:
+- cmake
+
+install_lib:
+- ${MAPBOX_GL_NATIVE_LIB_INSTALL_DIR}/lib/*.so*
+- ${MAPBOX_GL_QML_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/qt5/qml/*
+- ${S2GEOMETRY_LIB_INSTALL_DIR}/lib/*.so*
+install_bin:
+- ${PICOTTS_LIB_INSTALL_DIR}/usr/bin/pico2wave
+install_root_data:
+- packaging/click/manifest.json
+- packaging/click/pure-maps.apparmor
+- packaging/click/pure-maps.desktop
+- packaging/click/pure-maps.svg
+install_data:
+ ${PICOTTS_LIB_INSTALL_DIR}/usr/share/picotts: usr/share
+
+libraries:
+ mapbox-gl-native:
+ builder: cmake
+ build_args:
+ - -DMBGL_WITH_QT=ON
+ - -DMBGL_WITH_WERROR=OFF
+ - -DMBGL_WITH_QT_HEADLESS=OFF
+ - -DMBGL_WITH_QT_TEST=OFF
+ - -DMBGL_WITH_QT_DEMO=OFF
+ dependencies_ppa:
+ - ppa:janisozaur/cmake-update
+ dependencies_host:
+ - cmake
+
+ mapbox-gl-qml:
+ builder: qmake
+ build_args:
+ - INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include
+ - INCLUDEPATH+=${BUILD_DIR}/../mapbox-gl-native/install/include/qt5
+ - LIBS+=-L${BUILD_DIR}/../mapbox-gl-native/install/lib
+
+ s2geometry:
+ builder: cmake
+ build_args:
+ - -DBUILD_PYTHON=OFF
+ - -DBUILD_TESTING=OFF
+ - -DBUILD_SHARED_LIBS=ON
+ - -DBUILD_EXAMPLES=OFF
+ dependencies_ppa:
+ - ppa:janisozaur/cmake-update
+ dependencies_host:
+ - cmake
+ dependencies_target:
+ - swig
+ - libpython3-dev
+
+ picotts:
+ builder: custom
+ build:
+ - cp -r ${SRC_DIR}/* ${BUILD_DIR}/
+ - DESTDIR=${INSTALL_DIR} LANG_DIR=./usr/share/picotts/lang make -j${NUM_PROCS}
+ - DESTDIR=${INSTALL_DIR} make install
+ dependencies_target:
+ - libtool
+ - libpopt-dev
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/packaging/pure-maps.appdata.xml
^
|
@@ -38,6 +38,20 @@
</screenshots>
<metadata_license>CC-BY-SA-3.0</metadata_license>
<releases>
+ <release version="3.0.0" date="2022-03-16">
+ <description>
+ <ul>
+ <li>Switch over to Maplibre Native GL based plugin</li>
+ <li>Show traffic impact on route</li>
+ <li>Update route traffic info while routing</li>
+ <li>Switch to SVG based map icons</li>
+ <li>Notify the changes in positioning precision during navigation</li>
+ <li>Update build scripts [pabloyoyoista]</li>
+ <li>Update Ubuntu Touch build scripts [jonnius]</li>
+ <li>Update translations</li>
+ </ul>
+ </description>
+ </release>
<release version="2.9.0" date="2021-11-22">
<description>
<ul>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/po/pure-maps.pot
^
|
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-01-02 21:13+0200\n"
+"POT-Creation-Date: 2022-03-15 22:02+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -51,7 +51,7 @@
msgstr ""
#: poor/history.py:33 qml/GeocodeItem.qml:210 qml/GeocodeItem.qml:544
-#: qml/MenuPage.qml:87 qml/Navigator.qml:193 qml/NearbyPage.qml:30
+#: qml/MenuPage.qml:87 qml/Navigator.qml:214 qml/NearbyPage.qml:30
#: qml/NearbyPage.qml:161 qml/NearbyPage.qml:176 qml/RoutePage.qml:40
#: qml/RoutePage.qml:42 qml/RoutePage.qml:102 qml/RoutePage.qml:461
#: qml/RoutePage.qml:466 qml/RoutePage.qml:694 qml/RoutePage.qml:723
@@ -161,45 +161,45 @@
msgid "Exit: "
msgstr ""
-#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:961
-#: src/navigator.cpp:973
+#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:1002
+#: src/navigator.cpp:1014
msgid "mi"
msgstr ""
-#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:961
-#: src/navigator.cpp:973
+#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:1002
+#: src/navigator.cpp:1014
msgid "miles"
msgstr ""
-#: poor/util.py:231 qml/Meters.qml:85 src/navigator.cpp:964
+#: poor/util.py:231 qml/Meters.qml:85 src/navigator.cpp:1005
msgid "ft"
msgstr ""
-#: poor/util.py:231 src/navigator.cpp:964
+#: poor/util.py:231 src/navigator.cpp:1005
msgid "feet"
msgstr ""
-#: poor/util.py:242 qml/Meters.qml:95 src/navigator.cpp:976
+#: poor/util.py:242 qml/Meters.qml:95 src/navigator.cpp:1017
msgid "yd"
msgstr ""
-#: poor/util.py:242 src/navigator.cpp:976
+#: poor/util.py:242 src/navigator.cpp:1017
msgid "yards"
msgstr ""
-#: poor/util.py:249 src/navigator.cpp:985
+#: poor/util.py:249 src/navigator.cpp:1026
msgid "km"
msgstr ""
-#: poor/util.py:249 src/navigator.cpp:985
+#: poor/util.py:249 src/navigator.cpp:1026
msgid "kilometers"
msgstr ""
-#: poor/util.py:253 qml/Meters.qml:105 src/navigator.cpp:988
+#: poor/util.py:253 qml/Meters.qml:105 src/navigator.cpp:1029
msgid "m"
msgstr ""
-#: poor/util.py:253 src/navigator.cpp:988
+#: poor/util.py:253 src/navigator.cpp:1029
msgid "meters"
msgstr ""
@@ -255,146 +255,146 @@
msgid "{:d} h {:d} min"
msgstr ""
-#: routers/here.py:311
+#: routers/here.py:319
#, python-brace-format
msgid "Continue for {distance}"
msgstr ""
-#: routers/here.py:324
+#: routers/here.py:332
msgid "Arrive at your destination"
msgstr ""
-#: routers/here.py:328
+#: routers/here.py:336
msgid "Board the ferry"
msgstr ""
-#: routers/here.py:332
+#: routers/here.py:340
msgid "Continue"
msgstr ""
-#: routers/here.py:337
+#: routers/here.py:345
msgid "Merge right and continue on highway"
msgstr ""
-#: routers/here.py:339
+#: routers/here.py:347
msgid "Merge left and continue on highway"
msgstr ""
-#: routers/here.py:343
+#: routers/here.py:351
msgid "Disembark the ferry"
msgstr ""
-#: routers/here.py:347
+#: routers/here.py:355
msgid "Start navigation"
msgstr ""
-#: routers/here.py:352
+#: routers/here.py:360
msgid "Merge right and enter highway"
msgstr ""
-#: routers/here.py:354
+#: routers/here.py:362
msgid "Merge left and enter highway"
msgstr ""
-#: routers/here.py:356
+#: routers/here.py:364
msgid "Enter highway"
msgstr ""
-#: routers/here.py:369
+#: routers/here.py:377
msgid "Take exit on the right"
msgstr ""
-#: routers/here.py:371
+#: routers/here.py:379
msgid "Take exit on the left"
msgstr ""
-#: routers/here.py:374
+#: routers/here.py:382
#, python-brace-format
msgid "Take exit {number} on the right"
msgstr ""
-#: routers/here.py:376
+#: routers/here.py:384
#, python-brace-format
msgid "Take exit {number} on the left"
msgstr ""
-#: routers/here.py:383
+#: routers/here.py:391
msgid "Keep right"
msgstr ""
-#: routers/here.py:385
+#: routers/here.py:393
msgid "Keep left"
msgstr ""
-#: routers/here.py:389
+#: routers/here.py:397
msgid "Keep straight"
msgstr ""
-#: routers/here.py:395
+#: routers/here.py:403
msgid "Enter the roundabout and take the first exit"
msgstr ""
-#: routers/here.py:397
+#: routers/here.py:405
msgid "Enter the roundabout and take the second exit"
msgstr ""
-#: routers/here.py:399
+#: routers/here.py:407
msgid "Enter the roundabout and take the third exit"
msgstr ""
-#: routers/here.py:401
+#: routers/here.py:409
msgid "Enter the roundabout and take the fourth exit"
msgstr ""
-#: routers/here.py:403
+#: routers/here.py:411
msgid "Enter the roundabout and take the fifth exit"
msgstr ""
-#: routers/here.py:405
+#: routers/here.py:413
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/po/sv.po
^
|
@@ -5,16 +5,16 @@
#
# Translators:
# rinigus github, 2021
-# Åke Engelbrektson, 2021
+# Åke Engelbrektson, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-11-22 21:12+0200\n"
+"POT-Creation-Date: 2022-03-15 22:02+0200\n"
"PO-Revision-Date: 2018-08-22 13:49+0000\n"
-"Last-Translator: Åke Engelbrektson, 2021\n"
+"Last-Translator: Åke Engelbrektson, 2022\n"
"Language-Team: Swedish (https://www.transifex.com/rinigus/teams/89597/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -56,7 +56,7 @@
msgstr "Tidsgränsen för anslutning överskreds"
#: poor/history.py:33 qml/GeocodeItem.qml:210 qml/GeocodeItem.qml:544
-#: qml/MenuPage.qml:87 qml/Navigator.qml:193 qml/NearbyPage.qml:30
+#: qml/MenuPage.qml:87 qml/Navigator.qml:214 qml/NearbyPage.qml:30
#: qml/NearbyPage.qml:161 qml/NearbyPage.qml:176 qml/RoutePage.qml:40
#: qml/RoutePage.qml:42 qml/RoutePage.qml:102 qml/RoutePage.qml:461
#: qml/RoutePage.qml:466 qml/RoutePage.qml:694 qml/RoutePage.qml:723
@@ -191,8 +191,8 @@
" skäl</a> möjliggör Pure Maps HERE-sökning och ruttberäkning i en dedikerad "
"\"HERE Online-profil\". Vid inaktiv, se policyn för godtagbar användning "
"från 2018 för detaljerad info om användning av HERE tillsammans med andra "
-"leverantörer under avsnittet <a href=\"https://legal.here.com/en-gb/terms"
-"/acceptable-use-policy-2018\">Lager och ändringar</a> i "
+"leverantörer under avsnittet <a href=\"https://legal.here.com/en-"
+"gb/terms/acceptable-use-policy-2018\">Lager och ändringar</a> i "
"dokumentet.</p><br><p> Vänligen acceptera antingen villkoren och policyn "
"eller avvisa dem. Om det avvisas kommer HERE-supporten att vara inaktiv och "
"kan aktiveras senare genom att acceptera villkoren i Inställningar under "
@@ -206,45 +206,45 @@
msgid "Exit: "
msgstr "Avfart: "
-#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:961
-#: src/navigator.cpp:973
+#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:1002
+#: src/navigator.cpp:1014
msgid "mi"
msgstr "mi"
-#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:961
-#: src/navigator.cpp:973
+#: poor/util.py:227 poor/util.py:238 src/navigator.cpp:1002
+#: src/navigator.cpp:1014
msgid "miles"
msgstr "miles"
-#: poor/util.py:231 qml/Meters.qml:85 src/navigator.cpp:964
+#: poor/util.py:231 qml/Meters.qml:85 src/navigator.cpp:1005
msgid "ft"
msgstr "ft"
-#: poor/util.py:231 src/navigator.cpp:964
+#: poor/util.py:231 src/navigator.cpp:1005
msgid "feet"
msgstr "feet"
-#: poor/util.py:242 qml/Meters.qml:95 src/navigator.cpp:976
+#: poor/util.py:242 qml/Meters.qml:95 src/navigator.cpp:1017
msgid "yd"
msgstr "yd"
-#: poor/util.py:242 src/navigator.cpp:976
+#: poor/util.py:242 src/navigator.cpp:1017
msgid "yards"
msgstr "yards"
-#: poor/util.py:249 src/navigator.cpp:985
+#: poor/util.py:249 src/navigator.cpp:1026
msgid "km"
msgstr "km"
-#: poor/util.py:249 src/navigator.cpp:985
+#: poor/util.py:249 src/navigator.cpp:1026
msgid "kilometers"
msgstr "kilometer"
-#: poor/util.py:253 qml/Meters.qml:105 src/navigator.cpp:988
+#: poor/util.py:253 qml/Meters.qml:105 src/navigator.cpp:1029
msgid "m"
msgstr "m"
-#: poor/util.py:253 src/navigator.cpp:988
+#: poor/util.py:253 src/navigator.cpp:1029
msgid "meters"
msgstr "meter"
@@ -300,146 +300,146 @@
msgid "{:d} h {:d} min"
msgstr "{:d} t {:d} min"
-#: routers/here.py:311
+#: routers/here.py:319
#, python-brace-format
msgid "Continue for {distance}"
msgstr "Fortsätt {distance}"
-#: routers/here.py:324
+#: routers/here.py:332
msgid "Arrive at your destination"
msgstr "Anländ till din destination."
-#: routers/here.py:328
+#: routers/here.py:336
msgid "Board the ferry"
msgstr "Borda färjan"
-#: routers/here.py:332
+#: routers/here.py:340
msgid "Continue"
msgstr "Fortsätt"
-#: routers/here.py:337
+#: routers/here.py:345
msgid "Merge right and continue on highway"
msgstr "Håll höger och fortsätt på motorvägen"
-#: routers/here.py:339
+#: routers/here.py:347
msgid "Merge left and continue on highway"
msgstr "Håll vänster och fortsätt på motorvägen"
-#: routers/here.py:343
+#: routers/here.py:351
msgid "Disembark the ferry"
msgstr "Lämna färjan"
-#: routers/here.py:347
+#: routers/here.py:355
msgid "Start navigation"
msgstr "Starta navigering"
-#: routers/here.py:352
+#: routers/here.py:360
msgid "Merge right and enter highway"
msgstr "Håll höger och anslut till motorvägen"
-#: routers/here.py:354
+#: routers/here.py:362
msgid "Merge left and enter highway"
msgstr "Håll vänster och anslut till motorvägen"
-#: routers/here.py:356
+#: routers/here.py:364
msgid "Enter highway"
msgstr "Anslut till motorvägen"
-#: routers/here.py:369
+#: routers/here.py:377
msgid "Take exit on the right"
msgstr "Ta avfarten till höger"
-#: routers/here.py:371
+#: routers/here.py:379
msgid "Take exit on the left"
msgstr "Ta avfarten till vänster"
-#: routers/here.py:374
+#: routers/here.py:382
#, python-brace-format
msgid "Take exit {number} on the right"
msgstr "Ta avfart {number} till höger"
-#: routers/here.py:376
+#: routers/here.py:384
#, python-brace-format
msgid "Take exit {number} on the left"
msgstr "Ta avfart {number} till vänster"
-#: routers/here.py:383
+#: routers/here.py:391
msgid "Keep right"
msgstr "Håll kvar höger"
-#: routers/here.py:385
+#: routers/here.py:393
msgid "Keep left"
msgstr "Håll kvar vänster"
-#: routers/here.py:389
+#: routers/here.py:397
msgid "Keep straight"
msgstr "Håll kvar rakt fram"
-#: routers/here.py:395
+#: routers/here.py:403
msgid "Enter the roundabout and take the first exit"
msgstr "Kör in i rondellen och ta första avfarten"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/poor/config.py
^
|
@@ -116,6 +116,7 @@
"show_speed_limit": "always",
"smooth_position_animation_when_navigating": False,
"tilt_when_navigating": True,
+ "traffic_reroute_time": -1,
# "metric", "american" or "british".
"units": "metric",
# "male" or "female"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/BasemapButton.qml
^
|
@@ -444,8 +444,6 @@
width: parent.width
onValueChanged: {
app.conf.set("map_scale", value);
- if (app.mode !== modes.followMe && app.mode !== modes.navigate && app.mode !== modes.navigatePost)
- map.setScale(value);
}
}
@@ -462,8 +460,6 @@
onValueChanged: {
if (!app.transportMode) return;
app.conf.set("map_scale_navigation_" + app.transportMode, value);
- if (app.mode === modes.followMe || app.mode === modes.navigate || app.mode === modes.navigatePost)
- map.setScale(value);
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/Config.qml
^
|
@@ -50,6 +50,22 @@
property bool mapModeCleanShowNavigationStartPause
property bool mapModeCleanShowNavigationClear
property bool mapModeCleanShowScale
+ property real mapScale: 1
+ property real mapScaleNavigation: {
+ if (!app || !app.transportMode)
+ return app.conf.mapScaleNavigationCar;
+ if (app.transportMode === "bicycle")
+ return app.conf.mapScaleNavigationBicycle;
+ if (app.transportMode === "foot")
+ return app.conf.mapScaleNavigationFoot;
+ if (app.transportMode === "transit")
+ return app.conf.mapScaleNavigationTransit;
+ return app.conf.mapScaleNavigationCar;
+ }
+ property real mapScaleNavigationBicycle: 1
+ property real mapScaleNavigationCar: 1
+ property real mapScaleNavigationFoot: 1
+ property real mapScaleNavigationTransit: 1
property real mapZoomAutoTime
property bool mapZoomAutoWhenNavigating: false
property real mapZoomAutoZeroSpeedZ
@@ -63,6 +79,7 @@
property string showSpeedLimit
property bool smoothPositionAnimationWhenNavigating: false
property bool tiltWhenNavigating
+ property int trafficRerouteTime: -1
property string units
property string voiceGender
property bool voiceNavigation
@@ -99,6 +116,11 @@
"mapModeCleanShowNavigationStartPause": "map_mode_clean_show_navigation_start_pause",
"mapModeCleanShowNavigationClear": "map_mode_clean_show_navigation_clear",
"mapModeCleanShowScale": "map_mode_clean_show_scale",
+ "mapScale": "map_scale",
+ "mapScaleNavigationBicycle": "map_scale_navigation_bicycle",
+ "mapScaleNavigationCar": "map_scale_navigation_car",
+ "mapScaleNavigationFoot": "map_scale_navigation_foot",
+ "mapScaleNavigationTransit": "map_scale_navigation_transit",
"mapZoomAutoTime": "map_zoom_auto_time",
"mapZoomAutoWhenNavigating": "map_zoom_auto_when_navigating",
"mapZoomAutoZeroSpeedZ": "map_zoom_auto_zero_speed_z",
@@ -111,6 +133,7 @@
"showSpeedLimit": "show_speed_limit",
"smoothPositionAnimationWhenNavigating": "smooth_position_animation_when_navigating",
"tiltWhenNavigating": "tilt_when_navigating",
+ "trafficRerouteTime": "traffic_reroute_time",
"units": "units",
"voiceGender": "voice_gender",
"voiceNavigation": "voice_navigation"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/Map.qml
^
|
@@ -38,7 +38,8 @@
if (app.mode === modes.followMe) return 50;
return 0; // should never get here
}
- pixelRatio: styler.themePixelRatio * 1.5
+ pixelRatio: styler.themePixelRatio * 1.5 * scale
+ //useFBO: true
zoomLevel: 4.0
property int animationTime: {
@@ -83,6 +84,15 @@
return "default";
}
property bool ready: false
+ property real scale: {
+ if (app.mode === modes.followMe ||
+ app.mode === modes.navigate ||
+ app.mode === modes.navigatePost) {
+ return app.conf.mapScaleNavigation;
+ }
+ return app.conf.mapScale;
+ }
+
property bool showNavButtons: false
readonly property var images: QtObject {
@@ -305,9 +315,7 @@
Component.onCompleted: {
map.initSources();
- map.initIcons();
- map.initLayers();
- map.configureLayers();
+ map.setStyleAdditions();
map.initProperties();
map.updatePois();
map.updateMargins();
@@ -334,6 +342,8 @@
onHeightChanged: map.updateMargins();
+ onMapToQtPixelRatioChanged: setStyleAdditions()
+
onMapTypeChanged: setBias()
onStyleJsonChanged: {
@@ -353,15 +363,15 @@
function configureLayers() {
// Configure layer for selected POI markers.
map.setPaintProperty(map.layers.poisSelected, "circle-opacity", 0);
- map.setPaintProperty(map.layers.poisSelected, "circle-radius", 16 / map.pixelRatio);
+ map.setPaintProperty(map.layers.poisSelected, "circle-radius", 8 * map.mapToQtPixelRatio / map.devicePixelRatio * styler.themePixelRatio);
map.setPaintProperty(map.layers.poisSelected, "circle-stroke-color", styler.route);
map.setPaintProperty(map.layers.poisSelected, "circle-stroke-opacity", styler.routeOpacity);
- map.setPaintProperty(map.layers.poisSelected, "circle-stroke-width", 13 / map.pixelRatio);
+ map.setPaintProperty(map.layers.poisSelected, "circle-stroke-width", 6 * map.mapToQtPixelRatio / map.devicePixelRatio * styler.themePixelRatio);
// Configure layer for non-bookmarked POI markers.
map.setLayoutProperty(map.layers.pois, "icon-allow-overlap", true);
map.setLayoutProperty(map.layers.pois, "icon-anchor", "bottom");
map.setLayoutProperty(map.layers.pois, "icon-image", map.images.poi);
- map.setLayoutProperty(map.layers.pois, "icon-size", 1.0 / map.pixelRatio);
+ map.setLayoutProperty(map.layers.pois, "icon-size", 1.0 * map.mapToQtPixelRatio / map.devicePixelRatio );
map.setLayoutProperty(map.layers.pois, "text-anchor", "top");
map.setLayoutProperty(map.layers.pois, "text-field", "{name}");
map.setLayoutProperty(map.layers.pois, "text-optional", true);
@@ -373,7 +383,7 @@
map.setLayoutProperty(map.layers.poisBookmarked, "icon-allow-overlap", true);
map.setLayoutProperty(map.layers.poisBookmarked, "icon-anchor", "bottom");
map.setLayoutProperty(map.layers.poisBookmarked, "icon-image", map.images.poiBookmarked);
- map.setLayoutProperty(map.layers.poisBookmarked, "icon-size", 1.0 / map.pixelRatio);
+ map.setLayoutProperty(map.layers.poisBookmarked, "icon-size", 1.0 * map.mapToQtPixelRatio / map.devicePixelRatio );
map.setLayoutProperty(map.layers.poisBookmarked, "text-anchor", "top");
map.setLayoutProperty(map.layers.poisBookmarked, "text-field", "{name}");
map.setLayoutProperty(map.layers.poisBookmarked, "text-optional", true);
@@ -386,36 +396,36 @@
map.setLayoutProperty(map.layers.route, "line-join", "round");
map.setPaintProperty(map.layers.route, "line-color", styler.route);
map.setPaintProperty(map.layers.route, "line-opacity", styler.routeOpacity);
- map.setPaintProperty(map.layers.route, "line-width", 16 / map.pixelRatio);
+ map.setPaintProperty(map.layers.route, "line-width", 10);
// Configure layer for route casing.
map.setLayoutProperty(map.layers.routeOutline, "line-cap", "round");
map.setLayoutProperty(map.layers.routeOutline, "line-join", "round");
map.setPaintProperty(map.layers.routeOutline, "line-color", styler.route);
- map.setPaintProperty(map.layers.routeOutline, "line-gap-width", 16 / map.pixelRatio);
+ map.setPaintProperty(map.layers.routeOutline, "line-gap-width", 10);
map.setPaintProperty(map.layers.routeOutline, "line-opacity", 1 - (1-styler.routeOpacity)/2);
- map.setPaintProperty(map.layers.routeOutline, "line-width", 4 / map.pixelRatio);
+ map.setPaintProperty(map.layers.routeOutline, "line-width", 3);
// Configure layer for active maneuver markers.
map.setPaintProperty(map.layers.maneuvers, "circle-color", styler.maneuver);
map.setPaintProperty(map.layers.maneuvers, "circle-pitch-alignment", "map");
- map.setPaintProperty(map.layers.maneuvers, "circle-radius", 11 / map.pixelRatio);
+ map.setPaintProperty(map.layers.maneuvers, "circle-radius", 5);
map.setPaintProperty(map.layers.maneuvers, "circle-stroke-color", styler.route);
- map.setPaintProperty(map.layers.maneuvers, "circle-stroke-width", 4 / map.pixelRatio);
+ map.setPaintProperty(map.layers.maneuvers, "circle-stroke-width", 2);
// Configure layer for passive maneuver markers.
map.setPaintProperty(map.layers.nodes, "circle-color", styler.maneuver);
map.setPaintProperty(map.layers.nodes, "circle-pitch-alignment", "map");
- map.setPaintProperty(map.layers.nodes, "circle-radius", 5 / map.pixelRatio);
+ map.setPaintProperty(map.layers.nodes, "circle-radius", 3);
map.setPaintProperty(map.layers.nodes, "circle-stroke-color", styler.route);
- map.setPaintProperty(map.layers.nodes, "circle-stroke-width", 3 / map.pixelRatio);
+ map.setPaintProperty(map.layers.nodes, "circle-stroke-width", 1);
// Configure layer for dummy symbols that knock out road shields etc.
map.setLayoutProperty(map.layers.dummies, "icon-image", map.images.pixel);
- map.setLayoutProperty(map.layers.dummies, "icon-padding", 20 / map.pixelRatio);
+ map.setLayoutProperty(map.layers.dummies, "icon-padding", 15);
map.setLayoutProperty(map.layers.dummies, "icon-rotation-alignment", "map");
map.setLayoutProperty(map.layers.dummies, "visibility", "visible");
// Configure layer for location markers.
map.setLayoutProperty(map.layers.locations, "icon-allow-overlap", true);
map.setLayoutProperty(map.layers.locations, "icon-anchor", "bottom");
map.setLayoutProperty(map.layers.locations, "icon-image", "{symbol}");
- map.setLayoutProperty(map.layers.locations, "icon-size", 1.0 / map.pixelRatio);
+ map.setLayoutProperty(map.layers.locations, "icon-size", 1.0 * map.mapToQtPixelRatio / map.devicePixelRatio );
map.setLayoutProperty(map.layers.locations, "text-anchor", "top");
map.setLayoutProperty(map.layers.locations, "text-field", "{name}");
map.setLayoutProperty(map.layers.locations, "text-optional", true);
@@ -444,12 +454,13 @@
function initIcons() {
var suffix = "";
if (styler.position) suffix = "-" + styler.position;
- map.addImagePath(map.images.locationDest, Qt.resolvedUrl(app.getIconScaled("icons/marker/flag-dest" + suffix, true)));
- map.addImagePath(map.images.locationEnd, Qt.resolvedUrl(app.getIconScaled("icons/marker/flag-end" + suffix, true)));
- map.addImagePath(map.images.locationStart, Qt.resolvedUrl(app.getIconScaled("icons/marker/flag-start" + suffix, true)));
- map.addImagePath(map.images.locationWay, Qt.resolvedUrl(app.getIconScaled("icons/marker/flag-way" + suffix, true)));
- map.addImagePath(map.images.poi, Qt.resolvedUrl(app.getIconScaled("icons/marker/marker-stroked" + suffix, true)));
- map.addImagePath(map.images.poiBookmarked, Qt.resolvedUrl(app.getIconScaled("icons/marker/marker" + suffix, true)));
+ var iconSize = 35 * styler.themePixelRatio;
+ map.addImagePath(map.images.locationDest, Qt.resolvedUrl(app.getIcon("icons/marker/flag-dest" + suffix, true)), iconSize);
+ map.addImagePath(map.images.locationEnd, Qt.resolvedUrl(app.getIcon("icons/marker/flag-end" + suffix, true)), iconSize);
+ map.addImagePath(map.images.locationStart, Qt.resolvedUrl(app.getIcon("icons/marker/flag-start" + suffix, true)), iconSize);
+ map.addImagePath(map.images.locationWay, Qt.resolvedUrl(app.getIcon("icons/marker/flag-way" + suffix, true)), iconSize);
+ map.addImagePath(map.images.poi, Qt.resolvedUrl(app.getIcon("icons/marker/marker-stroked" + suffix, true)), iconSize);
+ map.addImagePath(map.images.poiBookmarked, Qt.resolvedUrl(app.getIcon("icons/marker/marker" + suffix, true)), iconSize);
map.addImagePath(map.images.pixel, Qt.resolvedUrl("icons/pixel.png"));
}
@@ -513,10 +524,7 @@
}
attributionButton.logo = py.evaluate("poor.app.basemap.logo");
styler.apply(py.evaluate("poor.app.basemap.style_gui"))
- map.initIcons();
- map.initLayers();
- map.configureLayers();
- positionMarker.initIcons();
+ map.setStyleAdditions();
}
function setBias() {
@@ -545,7 +553,6 @@
map.autoCenter = false;
map.autoRotate = false;
if (map.zoomLevel > 14) map.setZoomLevel(14);
- map.setScale(app.conf.get("map_scale"));
}
function setModeExploreRoute() {
@@ -554,15 +561,13 @@
map.autoCenter = false;
map.autoRotate = false;
if (map.zoomLevel > 14) map.setZoomLevel(14);
- map.setScale(app.conf.get("map_scale"));
}
function setModeFollowMe() {
// follow me mode
- var scale = app.conf.get("map_scale_navigation_" + (app.transportMode ? app.transportMode : "car") );
+ var scale = app.conf.mapScaleNavigation;
var zoom = 15 - (scale > 1 ? Math.log(scale)*Math.LOG2E : 0);
if (map.zoomLevel < zoom) map.setZoomLevel(zoom);
- map.setScale(scale);
map.centerOnPosition();
map.autoCenter = true;
map.autoRotate = app.conf.autoRotateWhenNavigating;
@@ -571,10 +576,9 @@
function setModeNavigate() {
// map during navigation
- var scale = app.conf.get("map_scale_navigation_" + app.transportMode);
+ var scale = app.conf.mapScaleNavigation;
var zoom = 15 - (scale > 1 ? Math.log(scale)*Math.LOG2E : 0);
if (map.zoomLevel < zoom) map.setZoomLevel(zoom);
- map.setScale(scale);
map.centerOnPosition();
map.autoCenter = true;
map.autoRotate = app.conf.autoRotateWhenNavigating;
@@ -583,23 +587,15 @@
function setModeNavigatePost() {
// map after navigation in post mode
- var scale = app.conf.get("map_scale_navigation_" + app.transportMode);
+ var scale = app.conf.mapScaleNavigation;
var zoom = 15 - (scale > 1 ? Math.log(scale)*Math.LOG2E : 0);
if (map.zoomLevel < zoom) map.setZoomLevel(zoom);
- map.setScale(scale);
map.centerOnPosition();
map.autoCenter = true;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/MapGestureArea.qml
^
|
@@ -56,7 +56,9 @@
var dlat = (geocoordinate.latitude - poi.coordinate.latitude) / area.degLatPerPixel;
var dist2 = dlon*dlon + dlat*dlat;
// select only if poi is closer than 30 pixels (dist2 is square of that)
- if (dist2 < map.pixelRatio*map.pixelRatio*900 && (selectedPoi == null || selectedPoi.dist2 > dist2)) {
+ var ref = 30 * styler.themePixelRatio / map.devicePixelRatio
+ ref = ref * ref;
+ if (dist2 < ref && (selectedPoi == null || selectedPoi.dist2 > dist2)) {
selectedPoi = { 'poi': poi, 'dist2': dist2 };
}
});
@@ -100,8 +102,8 @@
function coordinatesMatch(a, b) {
// Return true if coordinates match given a sufficient tap buffer.
- var epsLon = map.pixelRatio * 30 * area.degLonPerPixel;
- var epsLat = map.pixelRatio * 30 * area.degLatPerPixel;
+ var epsLon = 30 * area.degLonPerPixel * styler.themePixelRatio / map.devicePixelRatio;
+ var epsLat = 30 * area.degLatPerPixel * styler.themePixelRatio / map.devicePixelRatio;
return (Math.abs(a.longitude - b.longitude) < epsLon &&
Math.abs(a.latitude - b.latitude ) < epsLat);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/Navigator.qml
^
|
@@ -36,6 +36,7 @@
property bool hasNextLocation: nextLocationDist
property bool hasOrigin: locationsModel.hasOrigin
property bool hasRoute: navigatorBase.route.length > 0
+ property bool hasTraffic: navigatorBase.hasTraffic
property alias icon: navigatorBase.icon
property alias locations: navigatorBase.locations
property alias locationsModel: navigatorBase.locationsModel
@@ -56,7 +57,6 @@
property int rerouteConsecutiveErrors: 0
property int rerouteConsecutiveIgnored: 0
property real reroutePreviousTime: -1
- property int rerouteTotalCalls: 0
property bool routing: false
property alias roundaboutExit: navigatorBase.roundaboutExit
property alias route: navigatorBase.route
@@ -65,11 +65,13 @@
property alias street: navigatorBase.street
property alias totalDist: navigatorBase.totalDist
property alias totalTime: navigatorBase.totalTime
+ property alias totalTimeInTraffic: navigatorBase.totalTimeInTraffic
property alias transportMode: navigatorBase.mode
NavigatorBase {
id: navigatorBase
horizontalAccuracy: app.conf.navigationHorizontalAccuracy
+ trafficRerouteTime: app.conf.trafficRerouteTime
units: app.conf.units
property bool voicePrepared: false
@@ -100,7 +102,27 @@
voice.prepare(text, preserve)
}
- onRerouteRequest: rerouteMaybe()
+ onRerouteRequest: {
+ // Find a new route if conditions are met.
+ if (!app.conf.reroute) return;
+ if (app.mode !== modes.navigate) return;
+ if (!gps.horizontalAccuracyValid || !gps.ready) return;
+ if (gps.horizontalAccuracy > 100) return;
+ if (!py.evaluate("poor.app.router.can_reroute")) return;
+ if (hasBeenAlongRoute) rerouteConsecutiveIgnored = 0;
+ var interval = 5000*Math.pow(2, Math.min(4, rerouteConsecutiveErrors + rerouteConsecutiveIgnored));
+ if (py.evaluate("poor.app.router.offline")) {
+ if (Date.now() - reroutePreviousTime < interval) return;
+ return reroute();
+ } else {
+ // Limit the total amount and frequency of rerouting for online routers
+ // to avoid an excessive amount of API calls (causing data traffic and
+ // costs) in some special case where the router returns bogus results
+ // and the user is not able to manually intervene.
+ if (Date.now() - reroutePreviousTime < interval) return;
+ return reroute(traffic);
+ }
+ }
onAlongRouteChanged: {
if (!hasBeenAlongRoute && alongRoute) hasBeenAlongRoute = true;
@@ -117,7 +139,6 @@
rerouteConsecutiveErrors = 0;
rerouteConsecutiveIgnored = 0;
reroutePreviousTime = -1;
- rerouteTotalCalls = 0;
hasBeenAlongRoute = alongRoute;
updatePosition();
}
@@ -174,7 +195,7 @@
saveRoute({});
}
- function findRoute(locations, options) {
+ function findRoute(locations, options, traffic) {
if (routing) return;
if (!options) options = {};
options.optimized = navigatorBase.optimized;
@@ -213,9 +234,10 @@
rerouteConsecutiveErrors++;
} else if (route && route.x && route.x.length > 0) {
app.notification.flash(navigatorBase.running ?
- app.tr("New route found") :
+ (traffic ? app.tr("Traffic and route updated") : app.tr("New route found")) :
app.tr("Route found"), notifyId);
- if (options.voicePrompt) navigatorBase.prompt("std:new route found");
+ if (options.voicePrompt) navigatorBase.prompt(traffic ? "std:traffic updated" :
+ "std:new route found");
setRoute(route);
rerouteConsecutiveErrors = 0;
if (options.fitToView) map.fitViewToRoute();
@@ -247,42 +269,20 @@
return true;
}
- function reroute() {
+ function reroute(traffic) {
// Find a new route from the current position to the existing destination.
if (routing) return;
- navigatorBase.prompt("std:rerouting");
+ if (!traffic) navigatorBase.prompt("std:rerouting");
if (!hasBeenAlongRoute) rerouteConsecutiveIgnored++;
hasBeenAlongRoute = false;
var loc = navigatorBase.locations.slice(1);
- findRoute(loc,
- { "heading": gps.direction,
- "notification": app.tr("Rerouting"),
- "voicePrompt": true } );
- reroutePreviousTime = Date.now();
- rerouteTotalCalls++;
- }
-
- function rerouteMaybe() {
- // Find a new route if conditions are met.
- if (!app.conf.reroute) return;
- if (app.mode !== modes.navigate) return;
- if (!gps.horizontalAccuracyValid || !gps.ready) return;
- if (gps.horizontalAccuracy > 100) return;
- if (!py.evaluate("poor.app.router.can_reroute")) return;
- if (hasBeenAlongRoute) rerouteConsecutiveIgnored = 0;
- var interval = 5000*Math.pow(2, Math.min(4, rerouteConsecutiveErrors + rerouteConsecutiveIgnored));
- if (py.evaluate("poor.app.router.offline")) {
- if (Date.now() - reroutePreviousTime < interval) return;
- return reroute();
- } else {
- // Limit the total amount and frequency of rerouting for online routers
- // to avoid an excessive amount of API calls (causing data traffic and
- // costs) in some special case where the router returns bogus results
- // and the user is not able to manually intervene.
- if (rerouteTotalCalls > 50) return;
- if (Date.now() - reroutePreviousTime < interval) return;
- return reroute();
+ var options = {
+ "heading": gps.direction,
+ "notification": traffic ? app.tr("Updating traffic"): app.tr("Rerouting"),
+ "voicePrompt": true
}
+ findRoute(loc, options, traffic);
+ reroutePreviousTime = Date.now();
}
function saveDestination() {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/PositionMarker.qml
^
|
@@ -87,9 +87,6 @@
marker.initIcons();
marker.initLayers();
marker.configureLayers();
- marker.updateDirection();
- marker.updateUncertainty();
- marker.updateVisibility();
}
on_AnimatePositionChanged: {
@@ -108,11 +105,11 @@
map.setLayoutProperty(marker.layers.still, "icon-allow-overlap", true);
map.setLayoutProperty(marker.layers.still, "icon-image", marker.images.still);
map.setLayoutProperty(marker.layers.still, "icon-rotation-alignment", "map");
- map.setLayoutProperty(marker.layers.still, "icon-size", 1 / map.pixelRatio);
+ map.setLayoutProperty(marker.layers.still, "icon-size", 1 * map.mapToQtPixelRatio / map.devicePixelRatio );
map.setLayoutProperty(marker.layers.moving, "icon-allow-overlap", true);
map.setLayoutProperty(marker.layers.moving, "icon-image", marker.images.moving);
map.setLayoutProperty(marker.layers.moving, "icon-rotation-alignment", "map");
- map.setLayoutProperty(marker.layers.moving, "icon-size", 1 / map.pixelRatio);
+ map.setLayoutProperty(marker.layers.moving, "icon-size", 1 * map.mapToQtPixelRatio / map.devicePixelRatio );
// set the layer immediately in accordence with the direction availibility.
// there seems to be a corner case in interaction with mapbox-gl qml when the layer
// visibility is changed in two consecutive calls before the changes are applied by
@@ -130,13 +127,22 @@
map.setPaintProperty(marker.layers.layerUncertainty, "circle-color", styler.positionUncertainty);
map.setPaintProperty(marker.layers.layerUncertainty, "circle-opacity", 0.15);
map.setPaintProperty(marker.layers.layerUncertainty, "circle-pitch-alignment", "map");
+
+ updateDirection();
+ updateUncertainty();
+ updateVisibility();
}
function initIcons() {
var suffix = "";
if (styler.position) suffix = "-" + styler.position;
- map.addImagePath(marker.images.still, Qt.resolvedUrl(app.getIconScaled("icons/position/position" + suffix, true)));
- map.addImagePath(marker.images.moving, Qt.resolvedUrl(app.getIconScaled("icons/position/position-direction" + suffix, true)));
+ var iconSize = 70 * styler.themePixelRatio;
+ map.addImagePath(marker.images.still,
+ Qt.resolvedUrl(app.getIcon("icons/position/position" + suffix, true)),
+ iconSize );
+ map.addImagePath(marker.images.moving,
+ Qt.resolvedUrl(app.getIcon("icons/position/position-direction" + suffix, true)),
+ iconSize );
}
function initLayers() {
@@ -165,7 +171,7 @@
function updateUncertainty() {
if (gps.horizontalAccuracyValid)
map.setPaintProperty(marker.layers.layerUncertainty, "circle-radius",
- gps.horizontalAccuracy / map.metersPerPixel / map.pixelRatio);
+ gps.horizontalAccuracy / map.metersPerMapPixel);
else
map.setPaintProperty(marker.layers.layerUncertainty, "circle-radius", 0);
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/PreferencesPage.qml
^
|
@@ -591,6 +591,39 @@
}
ComboBoxPL {
+ description: app.tr("Timeout between traffic information updates leading to possible rerouting. This is active only while routing.")
+ label: app.tr("Update traffic while routing")
+ model: [
+ app.tr("Disabled"),
+ app.tr("10 minutes"),
+ app.tr("20 minutes"),
+ app.tr("30 minutes"),
+ app.tr("45 minutes"),
+ app.tr("60 minutes")
+ ]
+ property var values: [-1, 600, 1200, 1800, 2700, 3600]
+ Component.onCompleted: {
+ var value = app.conf.trafficRerouteTime;
+ var r = values[0];
+ var ci = 0;
+ if (value > 0) {
+ for (var i=1; i < values.length; i++)
+ if (Math.abs(r - value) > Math.abs(values[i] - value)) {
+ r = values[i];
+ ci = i;
+ }
+ }
+ currentIndex = ci;
+ }
+ onCurrentIndexChanged: {
+ var index = currentIndex;
+ var v = values[index];
+ if (v !== app.conf.trafficRerouteTime)
+ app.conf.set("traffic_reroute_time", v);
+ }
+ }
+
+ ComboBoxPL {
id: speedLimitComboBox
description: app.tr("Show speed limit sign. Requires snapping position to the road to find the speed limit.")
enabled: mapmatchingSwitch.checked
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/RouteOverallInfo.qml
^
|
@@ -29,8 +29,9 @@
anchors.rightMargin: styler.themeHorizontalPageMargin
height: {
if (!visible) return 0;
- if (willFit) return lr1.height + lr2.height + styler.themePaddingMedium;
- return lr1.height + lr2.height + t1.height + t2.height + 3*styler.themePaddingMedium;
+ var trLine = hasTraffic ? lr3.height + styler.themePaddingMedium : 0;
+ if (willFit) return lr1.height + lr2.height + styler.themePaddingMedium + trLine;
+ return lr1.height + lr2.height + t1.height + t2.height + 3*styler.themePaddingMedium + trLine;
}
states: [
State {
@@ -75,6 +76,7 @@
width: parent.width
anchors.topMargin: styler.themePaddingMedium
}
+ // no changes for t3 as it is traffic line
}
]
@@ -82,6 +84,7 @@
property int col1w: Math.max(lr1.implicitWidth, lr2.implicitWidth)
property int col2w: Math.max(d1.implicitWidth, d2.implicitWidth)
property int col3w: Math.max(t1.implicitWidth, t2.implicitWidth)
+ property bool hasTraffic: app.navigator.hasTraffic
property bool willFit: width - styler.themePaddingLarge*2- col1w - col2w - col3w > 0
// Row 1
@@ -150,4 +153,19 @@
text: app.navigator.totalTime
width: infoLayout.col3w
}
+
+ // Row 3
+ LabelPL {
+ id: lr3
+ anchors.left: parent.left
+ anchors.top: t2.bottom
+ anchors.topMargin: styler.themePaddingMedium
+ anchors.right: parent.right
+ color: activeColors ? styler.themePrimaryColor : styler.themeHighlightColor
+ horizontalAlignment: Text.AlignRight
+ font.pixelSize: styler.themeFontSizeMedium
+ text: app.tr("incl %1 traffic delay", app.navigator.totalTimeInTraffic)
+ visible: infoLayout.hasTraffic
+ width: infoLayout.col1w
+ }
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/qml/platform.kirigami/StylerPL.qml
^
|
@@ -103,7 +103,7 @@
property real themePaddingMedium: Kirigami.Units.largeSpacing * 1
property real themePaddingSmall: Kirigami.Units.smallSpacing
- property real themePixelRatio: 1 //Screen.devicePixelRatio
+ property real themePixelRatio: Screen.devicePixelRatio
property bool darkTheme: (Kirigami.Theme.backgroundColor.r + Kirigami.Theme.backgroundColor.g +
Kirigami.Theme.backgroundColor.b) <
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/routers/README.md
^
|
@@ -34,6 +34,7 @@
],
"mode": "car",
"language": "en_US",
+ "traffic": 120,
}
```
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/routers/here.py
^
|
@@ -46,6 +46,7 @@
"avoid_tunnel": 0,
"language": poor.util.get_default_language("en-US"),
"shorter": 0,
+ "traffic": 1,
"type": "car",
}
@@ -118,6 +119,7 @@
lang = poor.conf.routers.here.language
units = "metric" if poor.conf.units == "metric" else "imperial"
transportMode = poor.conf.routers.here.type
+ traffic = poor.conf.routers.here.traffic
routingMode = "short" if poor.conf.routers.here.shorter else "fast"
origin = prepare_txtpoint(loc[0])
destination = prepare_txtpoint(loc[-1])
@@ -137,13 +139,15 @@
avoid = "&avoid[features]=" + (",".join(avoid))
else:
avoid = ""
-
+ # skip cache if traffic update is expected
+ skip_cache = traffic and transportMode in (["car", "bus", "taxi"])
url = URL.format(**locals()) + via + avoid
- with poor.util.silent(KeyError):
- return copy.deepcopy(cache[url])
+ if not traffic: url += "&departureTime=any"
+ if not skip_cache:
+ with poor.util.silent(KeyError):
+ return copy.deepcopy(cache[url])
result = poor.http.get_json(url)
result = poor.AttrDict(result)
- #return result
mode = MODE.get(transportMode,"car")
return parse_result(url, locations, result, mode, lang, loc)
@@ -153,6 +157,7 @@
X, Y, Man, LocPointInd = [], [], [], [0]
location_candidates = []
+ traffic = 0
for legs in result.routes[0].sections:
x, y = [], []
for p in poor.flexpolyline.decode(legs.polyline):
@@ -163,6 +168,7 @@
language = legs.language
transport_mode = legs.transport.mode
maneuvers = []
+ traffic += legs.summary.duration - legs.summary.baseDuration
if "preActions" in legs:
for maneuver in legs.preActions:
@@ -250,10 +256,12 @@
print("Data:", locations_processed, location_candidates, LocPointInd)
return dict()
+ if traffic < 1: traffic = 0
route = dict(x=X, y=Y,
locations=locations,
location_indexes=LocPointInd,
maneuvers=Man, mode=mode)
+ if traffic > 0.1: route["traffic"]=traffic
route["language"] = result.routes[0].sections[0].language.replace("-","_")
if route and route["x"]:
cache[url] = copy.deepcopy(route)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/routers/here_settings.qml
^
|
@@ -176,6 +176,20 @@
TextSwitchPL {
anchors.left: parent.left
anchors.right: parent.right
+ text: app.tr("Traffic")
+ visible: full && (typeComboBox.current_key == "car" ||
+ typeComboBox.current_key == "bus" ||
+ typeComboBox.current_key == "taxi")
+ Component.onCompleted: checked = app.conf.get("routers.here.traffic")
+ onCheckedChanged: {
+ if (!visible) return;
+ app.conf.set("routers.here.traffic", checked ? 1 : 0);
+ }
+ }
+
+ TextSwitchPL {
+ anchors.left: parent.left
+ anchors.right: parent.right
text: app.tr("Prefer shorter route")
visible: full && (typeComboBox.current_key == "car" || typeComboBox.current_key == "truck")
Component.onCompleted: checked = app.conf.get("routers.here.shorter")
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/src/CMakeLists.txt
^
|
@@ -13,6 +13,7 @@
add_compile_options(
-DAPP_NAME="${APP_NAME}"
+ -DAPP_REV_NAME="${APP_REV_NAME}"
-DAPP_VERSION="${PM_VERSION}"
-DDEFAULT_DATA_PREFIX="${DATADIR_RUNNING}/"
-DDEFAULT_FONTPROVIDER="${DEFAULT_FONTPROVIDER}"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/src/main.cpp
^
|
@@ -69,7 +69,7 @@
app->setApplicationVersion(APP_VERSION);
#ifdef IS_QTCONTROLS_QT
#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
- app->setDesktopFileName(APP_NAME ".desktop");
+ app->setDesktopFileName(APP_REV_NAME ".desktop");
#endif
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/src/navigator.cpp
^
|
@@ -32,8 +32,10 @@
setupTranslator();
clearRoute();
m_timer.setInterval(60000); // 1 minute
+ m_timer.setInterval(1000);
connect(&m_timer, &QTimer::timeout, this, &Navigator::updateEta);
+ connect(&m_timer, &QTimer::timeout, this, &Navigator::updateTraffic);
connect(this, &Navigator::languageChanged, this, &Navigator::setupTranslator);
connect(&m_locations_model, &LocationModel::locationArrived, this, &Navigator::locationArrived);
@@ -144,7 +146,7 @@
void Navigator::setPosition(const QGeoCoordinate &c, double direction, double horizontalAccuracy, bool valid)
{
- if (!m_index || !valid || horizontalAccuracy > 100)
+ if (!m_index || !valid || horizontalAccuracy > std::max(100.0, 3*m_horizontalAccuracy))
{
if (m_running)
{
@@ -152,16 +154,9 @@
qCritical() << "Programming error: called setPosition without route";
else if (!valid)
- {
- SET(icon, QLatin1String("position-unknown-no-signal"));
- SET(narrative, trans("Position unknown"));
- }
-
+ setPrecision(PrecisionStateNone, horizontalAccuracy);
else
- {
- SET(icon, QLatin1String("position-unknown-low-signal"));
- SET(narrative, trans("Position imprecise: accuracy %1").arg(distanceToStr(horizontalAccuracy)));
- }
+ setPrecision(PrecisionStateLow, horizontalAccuracy);
SET(directionValid, false);
SET(manDist, QLatin1String("-"));
@@ -169,18 +164,12 @@
SET(roundaboutExit, 0);
SET(sign, QVariantMap());
SET(street, QLatin1String());
- m_precision_insufficient = true;
}
return;
}
- // cleanup precision messages when the first good coordinate goes through
- if (m_precision_insufficient)
- {
- m_precision_insufficient = false;
- SET(narrative, trans("Preparing to start navigation"));
- }
+ setPrecision(PrecisionStatePrecise, horizontalAccuracy);
double accuracy_rad = S2Earth::MetersToRadians(std::max(horizontalAccuracy, m_horizontalAccuracy));
S1ChordAngle accuracy = S1ChordAngle::Radians(accuracy_rad);
@@ -509,6 +498,38 @@
//qDebug() << "Exit setPosition";
}
+void Navigator::setPrecision(Navigator::PrecisionState state, double horizontalAccuracy)
+{
+ if (state == m_precision) return;
+
+ if (m_running &&
+ state != PrecisionStateUnknown)
+ {
+ bool with_prompt = (m_precision != PrecisionStateUnknown);
+ // precision of location changed during navigation and
+ // we have to notify about it via voice prompt
+ if (state == PrecisionStateLow)
+ {
+ SET(icon, QLatin1String("position-unknown-low-signal"));
+ SET(narrative, trans("Position imprecise: accuracy %1").arg(distanceToStr(horizontalAccuracy)));
+ if (with_prompt) prompt(QStringLiteral("std:precision low"));
+ }
+ else if (state == PrecisionStateNone)
+ {
+ SET(icon, QLatin1String("position-unknown-no-signal"));
+ SET(narrative, trans("Position unknown"));
+ if (with_prompt) prompt(QStringLiteral("std:precision none"));
+ }
+ else if (state == PrecisionStatePrecise)
+ {
+ SET(narrative, trans("Preparing to start navigation"));
+ if (with_prompt) prompt(QStringLiteral("std:precision precise"));
+ }
+ }
+
+ m_precision = state;
+}
+
void Navigator::setRoute(QVariantMap m)
{
const double accuracy_m = 5;
@@ -533,6 +554,7 @@
m_prompts.clear();
m_reroute_request.start();
m_last_accuracy = -1;
+ setPrecision(PrecisionStateUnknown);
// clear traveled distance and locations only if not running
// that will keep progress intact on rerouting
@@ -885,9 +907,14 @@
// global vars
m_route_duration = duration_on_route;
+ m_route_duration_traffic = m.value("traffic", 0).toInt();
+ m_traffic_updated.restart();
SET(totalDist, distanceToStr(m_route_length_m));
SET(totalTime, timeToStr(m_route_duration));
+ SET(totalTimeInTraffic, timeToStr(m_route_duration_traffic));
+ SET(hasTraffic, m.contains("traffic"));
+
m_maneuvers_model.setManeuvers(m_maneuvers);
emit routeChanged();
@@ -896,6 +923,7 @@
void Navigator::setRunning(bool r)
{
+ setPrecision(PrecisionStateUnknown);
if (!m_index && r)
{
qWarning() << "Navigator: Cannot start routing without route. Fix the caller.";
@@ -908,6 +936,12 @@
emit runningChanged();
}
+void Navigator::setTrafficRerouteTime(int t)
+{
+ m_trafficRerouteTime = t;
+ emit trafficRerouteTimeChanged();
+}
+
void Navigator::setUnits(QString u)
{
m_units = u;
@@ -934,6 +968,13 @@
SET(progress, (int)round(100*p));
}
+void Navigator::updateTraffic()
+{
+ if (!m_running || !m_hasTraffic || m_trafficRerouteTime <= 0) return;
+ if (m_traffic_updated.elapsed() / 1000 < m_trafficRerouteTime /* in seconds */) return;
+ emit rerouteRequest(true);
+}
+
// Translations and string functions
QString Navigator::trans(const char *text) const
{
@@ -1004,8 +1045,9 @@
int minutes = round((seconds - hours*3600)/60);
// TRANSLATORS: Keep %1 and %2 as they are, will be replaced with numerical hours (%1) and minutes (%2)
return hours > 0 ? trans("%1 h %2 min").arg(hours).arg(minutes) :
+ minutes > 0 ?
// TRANSLATORS: Keep %1 as it is, it will be replaced with numerical minutes (%1)
- trans("%1 min").arg(minutes);
+ trans("%1 min").arg(minutes) : QString();
}
double Navigator::distanceRounded(double meters) const
@@ -1054,6 +1096,10 @@
m_std_prompts.insert(QLatin1String("std:new route found"), trans("New route found"));
m_std_prompts.insert(QLatin1String("std:rerouting"), trans("Rerouting"));
m_std_prompts.insert(QLatin1String("std:routing failed"), trans("Routing failed"));
+ m_std_prompts.insert(QLatin1String("std:traffic updated"), trans("Traffic and route updated"));
+ m_std_prompts.insert(QLatin1String("std:precision low"), trans("Position imprecise"));
+ m_std_prompts.insert(QLatin1String("std:precision none"), trans("Position unknown"));
+ m_std_prompts.insert(QLatin1String("std:precision precise"), trans("Position available"));
// first prompt that is needed, can request multiple times
emit promptPrepare(m_std_prompts["std:starting navigation"], true);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-pure-maps-3.0.0.tar.xz/src/navigator.h
^
|
@@ -33,6 +33,7 @@
Q_PROPERTY(QString destTime READ destTime NOTIFY destTimeChanged)
Q_PROPERTY(double direction READ direction NOTIFY directionChanged)
Q_PROPERTY(bool directionValid READ directionValid NOTIFY directionValidChanged)
+ Q_PROPERTY(bool hasTraffic READ hasTraffic NOTIFY hasTrafficChanged)
Q_PROPERTY(double horizontalAccuracy READ horizontalAccuracy WRITE setHorizontalAccuracy NOTIFY horizontalAccuracyChanged)
Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
Q_PROPERTY(QString language READ language NOTIFY languageChanged)
@@ -51,6 +52,8 @@
Q_PROPERTY(QString street READ street NOTIFY streetChanged)
Q_PROPERTY(QString totalDist READ totalDist NOTIFY totalDistChanged)
Q_PROPERTY(QString totalTime READ totalTime NOTIFY totalTimeChanged)
+ Q_PROPERTY(QString totalTimeInTraffic READ totalTimeInTraffic NOTIFY totalTimeInTrafficChanged)
+ Q_PROPERTY(int trafficRerouteTime READ trafficRerouteTime WRITE setTrafficRerouteTime NOTIFY trafficRerouteTimeChanged)
Q_PROPERTY(QString units READ units WRITE setUnits NOTIFY unitsChanged)
Q_PROPERTY(QVariantList route READ route NOTIFY routeChanged)
@@ -67,6 +70,7 @@
QString destTime() const { return m_destTime; }
double direction() const { return m_direction; }
bool directionValid() const { return m_directionValid; }
+ bool hasTraffic() const { return m_hasTraffic; }
double horizontalAccuracy() const { return m_horizontalAccuracy; }
QString icon() const { return m_icon; }
QString language() const { return m_language; }
@@ -83,8 +87,11 @@
QString street() const { return m_street; }
QString totalDist() const { return m_totalDist; }
QString totalTime() const { return m_totalTime; }
+ QString totalTimeInTraffic() const { return m_totalTimeInTraffic; }
+ int trafficRerouteTime() const { return m_trafficRerouteTime; }
void setHorizontalAccuracy(double accuracy);
+ void setTrafficRerouteTime(int t);
// locations
Q_INVOKABLE bool locationRemove(int index);
@@ -124,6 +131,7 @@
void destTimeChanged();
void directionChanged();
void directionValidChanged();
+ void hasTrafficChanged();
void horizontalAccuracyChanged();
void iconChanged();
void languageChanged();
@@ -136,7 +144,7 @@
void nextManDistChanged();
void optimizedChanged();
void progressChanged();
- void rerouteRequest();
+ void rerouteRequest(bool traffic=false);
void roundaboutExitChanged();
void routeChanged();
void runningChanged();
@@ -144,6 +152,8 @@
void streetChanged();
void totalDistChanged();
void totalTimeChanged();
+ void totalTimeInTrafficChanged();
+ void trafficRerouteTimeChanged();
void unitsChanged();
void promptPrepare(QString text, bool preserve);
void promptPlay(QString text);
@@ -151,12 +161,23 @@
void locationArrived(QString name, bool destination);
protected:
+ // precision states
+ enum PrecisionState {
+ PrecisionStateUnknown,
+ PrecisionStateNone,
+ PrecisionStateLow,
+ PrecisionStatePrecise
+ };
+
QString distanceToStr_american(double feet, bool condence) const;
QString distanceToStr_british(double yard, bool condence) const;
QString distanceToStr_metric(double meters, bool condence) const;
QString n2Str(double n, int roundDig=2) const;
double distanceRounded(double meters) const;
+
+ void setPrecision(PrecisionState state, double horizontalAccuracy=0);
+
Prompt makePrompt(const Maneuver &m, QString text, double dist_offset_m, double time_offset,
double speed_m, int importance, bool after=false) const;
void resetPrompts();
@@ -166,6 +187,7 @@
void updateEta();
void updateProgress();
+ void updateTraffic();
private:
// Edges of the route
@@ -210,6 +232,7 @@
double m_route_length_m{-1};
double m_route_duration{0};
+ double m_route_duration_traffic{0};
double m_distance_traveled_m{0};
double m_last_distance_along_route_m{0};
double m_last_duration_along_route{0};
@@ -217,6 +240,7 @@
double m_distance_to_route_m{-1};
size_t m_offroad_count{0};
QTime m_reroute_request;
+ QTime m_traffic_updated;
bool m_alongRoute{false};
QString m_destDist;
@@ -224,6 +248,7 @@
QString m_destTime;
double m_direction{0};
bool m_directionValid{false};
+ bool m_hasTraffic{false};
double m_horizontalAccuracy{15};
QString m_icon;
QString m_manDist;
@@ -232,13 +257,15 @@
QString m_nextIcon;
QString m_nextManDist;
bool m_optimized{false};
- bool m_precision_insufficient{false};
+ PrecisionState m_precision{PrecisionStateUnknown};
int m_progress{0};
int m_roundaboutExit{0};
QVariantMap m_sign;
QString m_street;
QString m_totalDist;
QString m_totalTime;
+ QString m_totalTimeInTraffic;
+ int m_trafficRerouteTime{-1};
QString m_units{QLatin1String("metric")};
|