Git Product home page Git Product logo

pure-maps's Introduction

Pure Maps

Matrix Discussions

Latest release SFOS Ubuntu Touch Flatpak

Packaging status

Pure Maps is an application for Sailfish OS and Linux to display vector and raster maps, places, routes, and provide navigation instructions with a flexible selection of data and service providers.

Pure Maps is free software released under the GNU General Public License (GPL), see the file COPYING for details. Pure Maps is a fork of WhoGo Maps that was made to continue its development.

User feedback

There are three main communication channels with the users: GitHub discussions and issues, Matrix channel #pure-maps:matrix.org and a thread at TMO.

Please use Github issues to address specific problems and development requests. General discussion is expected either through corresponding topics in GitHub discussions, issues, Matrix channel, or TMO thread.

Currently, the homepage for Pure Maps is a placeholder. You are welcome to help by working on the corresponding issue.

Command line options

Pure Maps supports positional argument (one) that could either specify geo:latitude,longitude URI or a search string that will be searched by geocoder.

If Pure Maps instance is running already, it will be contacted via DBus and the request will be forwarded.

DBus API

DBus (service io.github.rinigus.PureMaps at session bus) can be used to

  • search: method Search
  • show poi: method ShowPoi
  • get navigation status and control it.

There service is split as described below.

Global actions

Path: /io/github/rinigus/PureMaps Interface: io.github.rinigus.PureMaps

Methods:

  • Search(String search_string) - activates search action for given search_string

  • ShowPoi(String title, Double latitude, Double longitude) - show POI on map with the given coordinates and title.

Navigation

Path: /io/github/rinigus/PureMaps/navigator Interface: io.github.rinigus.PureMaps.navigator

Methods:

  • Clear() - stops navigation and removes current route

  • Start() -> Boolean - start navigation and returns true if succesful. If already started or has no route defined, will return false to indicate failure.

  • Stop() - stop navigation if running.

Properties and signals:

Each property has a corresponding ...Changed signal to indicate when the value of the property has changed.

  • destDist, destEta, destTime - human readable strings with the remaining distance, time, and estimated time of arrival

  • direction and directionValid - bearing of the current route segment and whether it is valid (current location is on route)

  • hasRoute - whether route has been set in application

  • icon - icon name for the next maneuver

  • language - navigation instructions language

  • manDist, manTime - remaining distance and time for the next maneuver in human readable form

  • mode - mode of transportation

  • narrative - longer next maneuver instruction, should be available for all maneuvers

  • alongRoute - whether current location is on route and movement is along it.

  • progress - current progress along the route in percentage (0-100)

  • running - whether navigation in active

  • street - short form of the narrative usually shown in Pure Maps next to the maneuver icon. Could be absent for some maneuvers

  • totalDist, totalTime - total route distance and time in human readable form.

Development

For development of Pure Maps and testing on desktop, you would have to choose platform for which you develop, install dependencies, and be able to run the application. In this case, Qt Creator can be used. See details below.

Alternative, is to use Flatpak-based environment and develop using that. For this approach, see separate README.

Building and Debugging for Ubuntu Touch is described in README.

Platforms

To support multiple platforms, QML code is split into platform-specific and platform-independent parts. Platform-independent part is in qml folder with the platform-dependent code under qml/<platform-id>. Correct platform is picked up in installation phase (make install) or is set by make for local builds.

Within platform-independent code, platform is included allowing to access platform-specific implementations of page stack, file dialog, and other specific aspects. For this approach to work, API in the platform specific implementation has to be the same for all platforms.

To add new platform, add new directory under qml, new Makefile target to set it, and implement all the required QML items. Take a look under other platforms for examples.

Dependencies

In addition to common dependencies for QML applications, the following are needed:

When developing with Kirigami using flatpak builder, dependencies will be pulled and installed in flatpak. See instructions regarding Kirigami below.

GPXPy is also provided as a thirdparty submodule and can be installed together with Pure Maps by setting corresponding option during cmake configuration phase.

Building

Starting from Pure Maps version 2.0, the application has to be compiled. You could either

  • compile/install/run
  • compile/run from source tree

In the both cases, you would have to specify platform via -DFLAVOR to cmake. Supported platforms:

  • Kirigami: FLAVOR=kirigami
  • QtControls: FLAVOR=qtcontrols
  • Sailfish: FLAVOR=silica
  • Ubuntu Touch: FLAVOR=uuitk

It is recommended to build the sources in a separate folder, as in

mkdir build
cd build
cmake -DFLAVOR=kirigami ..
make && make install

For compile/install/run, use regular make and make install before running application.

To run from the source tree, add -DRUN_FROM_SOURCE=ON option when running cmake. Please note that, when running from source tree, do not run make install in the build folder. Otherwise it can overwrite your source files. In this case, make and running compiled executable directly would allow you to run application without installation. For example, from Qt Creator directly.

The build options can be specified in Qt Creator under "Build settings" of the project. Just add them to the additional arguments of cmake.

Mainly targeting packagers, it is possible to specify default providers using cmake project options. Notice the difference in supplied values for basemap and other options:

  • DEFAULT_PROFILE=profile where profile is either online or offline
  • DEFAULT_BASEMAP=provider Map provider is either specified in basemap JSON as "provider" or, if absent, as "name"
  • DEFAULT_GEOCODER=provider
  • DEFAULT_GUIDE=provider
  • DEFAULT_ROUTER=provider

In the last three options, provider corresponds to the basename of JSON/Python file describing the provider. Example: "photon".

API keys

Note that you will need API keys if you wish to access the services that require them (such as Mapbox). For that, register as a developer and insert these keys in the preferences. Among services that don't require API keys are OSM Scout Server (for offline maps), HSL (raster tiles for Finland), Sputnik (raster tiles in Russian), Photon (search).

Packaging

Pure Maps is packaged for different distributions. Included in the source tree: Sailfish OS version is packaged as RPM, Linux version is packaged using Flatpak or RPM, and Ubuntu Touch version as click. Several distributions provide packaging scripts in their source trees.

For packaging, please copy poor/apikeys.py to tools/apikeys.py and fill missing API keys for the services that you plan to use. Note that the format of tools/apikeys.py has changed with 2.9 release.

Flatpak specific instructions are available under packaging/flatpak.

Ubuntu Touch specific instructions are available in Ubuntu Touch README.

Development

General

Throughout QML, Python, and C++ code, all the same type items (properties, signals, functions), are ordered alphabetically.

Its possible that some of the implemented code does not fully comply with the outlined order. Then it should be fixed eventually.

QML

To simplify development, there are few simple rules regarding QML file organization. QML files are organized as follows (use the needed components):

import A
import B
import "."

import "js/util.js" as Util

Item {
    id: item

    // base class defined properties in alphabetic order
    prop_a: val_a
    prop_b: val_b

    // new properties in alphabetic order
    property         var  np_a: default_a
    default property bool np_b: default_b

    // readonly properties
    readonly property var images: QtObject {
        readonly property string pixel:         "pure-image-pixel"
        readonly property string poi:           "pure-image-poi"
        readonly property string poiBookmarked: "pure-image-poi-bookmarked"
    }

    // signals
    signal mySignal

    // local unexported properties
    property bool _locked: false

    // behavior
    Behavior on bearing {
        RotationAnimation {
            direction: RotationAnimation.Shortest
            duration: map.ready ? 500 : 0
            easing.type: Easing.Linear
        }
    }

    // new sub-items following the same principles
    Item {
        id: subitem
    }

    // connections
    Connections {
    }

    // signal handlers
    Component.onCompleted: init()
    onActivated: doSomething()

    // functions
    function a() {
        return 10;
    }
}

pure-maps's People

Contributors

accumulator avatar atlochowski avatar carlosgonz0 avatar dos1 avatar eltmosen avatar henning-schild avatar ilpianista avatar jacekjagosz avatar jktjkt avatar jonnius avatar karry avatar m4rtink avatar mateosalta avatar mschilli87 avatar myii avatar newbytee avatar otsaloma avatar pabloyoyoista avatar popanz avatar puretryout avatar rinigus avatar stefwe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pure-maps's Issues

add support for routing by GPX

At present, only OSM Scout Server exposes functionality allowing to process GPX and make navigation instructions out of it. Add ability to load GPX file and process it with OSM Scout Server's Valhalla map matching to make it ready for navigation.

Share location URL switch to OSM

Why does the share location URL use Google Maps as a link?
Thus, while sharing, I am practically promoting the use of GMaps by others. Something I want to avoid.

Why not OSM.org as default?

mapbox night mode

i recall whogo maps having a night mode for mapbox default maps, i do remember they where quite unreadable but mapbox default maps are more pleasant to the eyes in respect to the osm ones.

maybe is possible to have mapbox night back with some tweaking to increase readability?

turn off Auto-rotate option completely

I almost never use this option 'cause I'm used to read oldschool maps where north is at the top. But as soon as I start, pause and resume navigation or reroute Auto-rotation is turned on again and I have to deactivate it manually every time (there should be a note at the setting that it's not for navigation mode like there is at the Snap position to road setting).
So either this option should be valid globaly (also in navigation mode) or there should be the same option again when starting navigation, also remembering the setting after a restart of Pure Maps.

Allow to regulate TTS volume

See https://talk.maemo.org/showpost.php?p=1547511&postcount=5 for description

Copy below:

A further question. I have a XperiaX which is comparing it to Jolla1 quite loud. Anyway for some reasons the output of Pure Maps (and also WhoGo Maps) is quite soft-spoken.

I have searched for config files where I can raise the volume but haven't found one. In the config files of Pure Maps and OSM Scout Server there is no option. And for Mimic I haven't found config files in /home/nemo. Any chance to raise the Volume?

reorganize page stack

I think its possible to reorganize page stack to make it use regular SFOS page stack organization. In particular, loose special handling of map and separate page stack.

For that, the return to search and routing results needs to be possible. This can be implemented by serializing pages with the results (or routing settings) and calling the serialized version if available in app.showMenu. As soon as called, serialization object is dropped and has to be set by the page before calling map.

This would allow to have temporary page stacks, such as for POI info/edit; probably navigation as well.

GUI redesign: overall discussion

With the application becoming more complex, we will have to redesign GUI to allow users simply to access relevant functionality. This is a somewhat longer term goal and the issue is opened to collect ideas and formulate the design.

There are at least two major parts of it:

  1. Design of what is visible on the map view and when
  2. Design of the main menu and its submenus

Note that the elements on the map view don't have to be static. We could show scale bar in a prominent position while scale is changed, but later fade it away, for example. Also, "full" map interface could be replaced with the simple interface, with the interfaces changed by tapping on a map. Something along the lines used by Camera apps, for example.

Pure Maps does not close / finish navigation properly

From TMO, https://talk.maemo.org/showpost.php?p=1545876&postcount=137 and https://talk.maemo.org/showpost.php?p=1547761&postcount=77

An even stranger thing happened about an hour later, when WhoGo was safely closed - or so I thought. I unlocked the phone for some other, unrelated reason, and it started speaking navigation instructions. I started WhoGo but it shut down instantly. I eventually had to restart Lipstick from Sailfish Utilities.

This has recently become the norm. Every time I use WhoGo for navigation, no matter how short, it always ends up like this. There was not a single time when it did not. I tried ending the navigation and clearing the route and all map markers before I close the application, but that seems to make zero difference. The GPS icon in the status bar is flashing and the battery drains about 4x faster than you would expect. Usually, unless I trigger this issue and the phone stays silent, I also get voice prompts even though no application is open.

I also found that restarting Lipstick is not enough. Only a complete reboot is. A reboot or power cycle every time after navigation has now become part of the experience. (This is on J1, but I have noticed at least one other user reporting a similar experience on the X.)

POI: add list of POIs page

  • Show a list of bookmarked and non-bookmarked POIs

  • search among POIs

  • show POI on a map when clicking on it

Nearby Venues regression

When using the Nearby Venues search option in both WhoGo Maps and Pure Maps, I get no results when using Pure Maps, while I do get results using the same query in WhoGo Maps.

Using downloaded map of the Netherlands;

  • Using: MapQuest Nominatim
  • Near: Rotterdam
  • Type: Drinkwater
  • Radius: 5 km

WhoGo Maps: 11 results
Pure Maps: no results

have an indicator for gps signal

From WhoGo Maps issues, by @legacychimera247

it would be nice to have an indicator showing us how is the signal and/or it's hooked or not

just to give you some example on what i mean, jolla maps has a circle surrounding the pointer, that becomes smaller and smaller as the signal is stronger, or herewego as a flashing circle surrounding the pointer and when the signal is good it stop flashing and the pointer becomes green

it would be nice to have something like this...

Icons for Pure Maps

Hi @popanz :

I have attached current RPM (has to be in ZIP when attached here). I think that the cover icon is fine now, at least on my phone (onyx). However, for app icon, some changes would be welcome:

  • I think that the borders around the planet are too thin. Compare with the messages icon, browser and such. Maybe we could do them larger? Maybe with gradient, if you like?

  • Green is very green on my phone. Bit too sharp, I think. What about you?

pure-maps.zip

Error message from API calls not passed to QML

Originally filed as Poor Maps' issue 65, which Otsaloma concluded with: Error messages would be nice yes, but are difficult as they require some manually inserted non-trivial glue. Currently only timeouts relay error messages.

For implementing this feature perfectly, I suppose a filtering mechanism is needed for errors returned from API / system calls, followed by transposing these errors into good looking SailfishOS notifications or messages.
But for a start, filtering certain errors and returning the error message unaltered per SailfishOS notification would still constitute a vast improvement compared to silently doing nothing (i.e., the current behavior).

I am refiling this, so it does not become forgotten, as it is just a usability suggestion.

check for duplicate pois

When adding a new POI from search and guide, check whether the poi exists already. If it does, don't add, but just show with the duplicate label

Nearby search with multiple types

From Kabouik at https://talk.maemo.org/showpost.php?p=1547519&postcount=9

Sometimes it would be good to be able to show all POIs next to the current location without any specific preselected category, but instead category icons on the map. Or, at least, having the possibility to preselect several categories. There are so many different keywords for food for instance, you never know if selecting Restaurants will show everything or if what you are looking for would instead be in Food, French Restaurant, Belgian Restaurant, Bagel Shop, Bakery, Breakfast spot, Burger, Café, etc. I know the keywords are inherited from the search service being used (and again here pointers would be helpful to choose one), but they are all cluttered so sometimes selecting several would just be easier, without the fear of missing something. Maybe even allowing the user to save some searches, so that he can do a meta search with all food-related stuff and then just select this meta-type later without bothering with the million keywords from Foursquare again.

possibility to repeat the last instruction by tts

I saw this kind of feature on a stand-alone car navigation system. While navigating you could always press in a certain area of the touchscreen and the voice repeated the last instruction. That feature would be nice in Pure Maps, too. (Maybe related to issue #32)

add HERE for map layers

  • regular
  • terrain
  • traffic
  • satellite

Drop Mapbox Satellite - it has lower number of requests than HERE.

toll option not working (or at least seems not to)

So, yesterday i gave a try to the new update (1.3.0 i guess)

i selected an almost near town which can be reached either via normal road or highway and i left every settings on default, so tolls and highways were preferred. The result i had was a route which involved going to the highway and paying a toll, and that's ok, then i selected the option "get a shorter route", and the route was exactly the same. After that i selected the options to avoid tolls and highways and i deselected the option to get a shorter route, and what i got was a route with resulted only in normal roads, then i selected to have a shorter route and even with the avoid option selected for both tolls and highways, what i got was exactly the first route which involved both.

on the return i decided to try again (on the contrary side) and even with the option to only use tolls and highways i only got a route with only normal streets

on the first case, i know i selected "get a shorter path" but i do assume that if the "avoid" option is selected , the "shorter path" option should give me a shorter path with no tolls at all or at least the same route if that's already the shorter path

on the second case, pure maps should have returned me a route with tolls and highways even if a shorter path is selected, considering the prefer (and not incline) option

so i do assume those options are not working, or i am doing something wrong?

change the cursor's colour

now that you have taken over the development i do assume i can redirect my suggestions/bugs reporting to you, and i start with something i think it's really important...

chang the colour of the cursor...i know it may be stupid but the cursor is blue and the route's line is blue too, it may get confusing from time to time, and on night mode is purple on purple, haven't tested this purple yet but but blue on night mode was even more confusing, so anyway would be nice to have the cursor or the line of another colour...

cursor is a little laggy

tried pure maps and the app itself works almost fine, the only thing is the cursor lag during the route...if i recall, whogo maps cursor was more fluid...is this something that could be improved or maybe is just the jolla one too slow for all these things on screen?

TTS invocation provides no initial audible feedback

Originally reported as Poor Maps' issue 69. When rereading this, after just having carried out a test with Pure Maps 1.3.0 (see below), I have the impression that the overall behavior of the voice navigation has become much more reproducible (or I just got used to carry out this test reproducibly), although the fundamental issue still persists.

I just walked around the block, following a precalculated route.

Side notes:

  • Pure Maps was started before a GPS fix was obtained. After a GPS fix was acquired, it took Pure Maps more than two minutes to visibly react to position updates.
  • At the start I had misconfigured the routing provider in OSM Scout Server. Thus when I started hitting "↻Reroute", the message "Rereouting failed" was displayed on the screen. After hitting "↻Reroute" a few more times, the message "Rereouting failed" was also narrated via TTS, and from that point on the "Rereouting failed" message was always successfully "spoken".
  • Hence I did let Pure Maps calculate a new route with OSM Scout Server as routing provider: Pure Maps was displaying a big, circling for more than two minutes, but when I interrupted the location search and route calculation, a properly calculated route was displayed and usable (or I coincidentally returned to the map view in the moment, the route calculation was finished).

The fundamental behavior was still the same, though:

  1. About every third time hitting "↻Reroute", the message "New route found" was also "spoken" (it is always displayed).
  2. About every third time "↻Reroute" is spoken, the first navigation instruction is also narrated (it is always displayed).
  3. If the first navigation instruction is successfully narrated, Pure Maps' voice navigation works fine for the whole route (until hitting "↻Reroute", again).

Tested with Pure Maps 1.3.0 (and WhoGo Maps / Poor Maps before) under SFOS 2.1.4.14 on a Jolla 1 phone. TTS engine used is picotts.
BTW, I switched off the 3D view (while navigating), as it is too slow to be fun for practical use on a Jolla 1 (but working fine!).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.