Active Topics

 



Notices


Reply
Thread Tools
Posts: 16 | Thanked: 50 times | Joined on Jul 2012
#241
Originally Posted by ferlanero View Post
Thank you very much for this piece of gold for Sailfish offline navigation. I have no words to be grateful for your work! Thank you very much @rinigus !
+1, the work you (including every people involved - server/clients) are doing is unbelievable, you are basically almost bringing to Sailfish a native solution for the most voted TJC feature! (almost because no voice, but I personally don't need it). It can really help promoting Sailfish.

One thing I've noticed while trying it is that the search results are totally not relevant when libpostal is not enabled. Wouldn't it make sense to enable it by default and invite the users to chose their search language(s) on first start?
 

The Following 3 Users Say Thank You to Sthocs For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#242
Originally Posted by Sthocs View Post
+1, the work you (including every people involved - server/clients) are doing is unbelievable, you are basically almost bringing to Sailfish a native solution for the most voted TJC feature! (almost because no voice, but I personally don't need it). It can really help promoting Sailfish.
There are still few things missing on server side - search and routing between all maps, for example - but we'll get there. The voice navigation (for me its actually rerouting that's most interesting) would surely come. As far as I remember, these features are in Poor Maps and modRana issues (aka TODO) lists.

Originally Posted by Sthocs View Post
One thing I've noticed while trying it is that the search results are totally not relevant when libpostal is not enabled. Wouldn't it make sense to enable it by default and invite the users to chose their search language(s) on first start?
That's a good suggestion. In general, I probably would need to add a wizard of some sorts that would help to setup the server. I was reluctant to enable libpostal by default (same with Mapnik) as it requires about 700 MB extra storage. Now the new version of libpostal may reduce that requirement, but I would have to move to the new version and test it properly first.

I'll add your suggestion into the issues of the server and will take a look into it a touch later. Its a great idea and should be implemented when I polish the interface. Right now, I am trying to get all the required features covered first, if I can do it in reasonable amount of time.
 

The Following 5 Users Say Thank You to rinigus For This Useful Post:
Posts: 58 | Thanked: 223 times | Joined on Apr 2017 @ Germany
#243
Hello guys,

I am currently developing a sport tracker app for SFOS.
I would like to use OSM Scout Server for providing map informations but unfortunately it does not work.

This is what I tried:
Code:
Map {
        id: map       
        plugin: Plugin 
        {
            name: "osm"
            PluginParameter
            {
                name: "useragent"
                value: "Laufhelden/0.0.1 (Sailfish)"                
            }
            PluginParameter { name: "osm.mapping.host"; value: "http://localhost:8553/v1/tile/" }
        }
        }
...
The map from the server seems not to be found and instead is trying to use WIFI connection to download the map.

The server is running nicely and works with modRana and Poor Maps.

You can find the whole code here: https://github.com/jdrescher2006/Lau...edViewPage.qml

Last edited by jdrescher; 2017-05-12 at 12:44. Reason: Adding info
 

The Following 3 Users Say Thank You to jdrescher For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#244
Originally Posted by jdrescher View Post
Hello guys,

I am currently developing a sport tracker app for SFOS.
I would like to use OSM Scout Server for providing map informations but unfortunately it does not work.

This is what I tried:
Code:
Map {
        id: map       
        plugin: Plugin 
        {
            name: "osm"
            PluginParameter
            {
                name: "useragent"
                value: "Laufhelden/0.0.1 (Sailfish)"                
            }
            PluginParameter { name: "osm.mapping.host"; value: "http://localhost:8553/v1/tile/" }
        }
        }
...
The map from the server seems not to be found and instead is trying to use WIFI connection to download the map.

The server is running nicely and works with modRana and Poor Maps.
Nice to see it used in map-related applications and I can only hope that it would spread .

I presume that you have OSM Scout Server running on the background while using the tracker app, right?

From the look of it, you are using QML Map type. I don't have experience with it, unfortunately. Maybe @otsaloma can help, or reading his Poor Maps code which seems to be using the same plugin. From reading Poor Maps MapPlugin, it looks like @otsaloma is using own server that probably re-routes requests further. Notice that URL syntax seems to be different. But again, I never used it in QML myself, others are much more qualified to help you out.

On the server side, you could check out whether it is accessed. For that, in server settings, enable "Log info messages". Then, while accessing the map in your application, check whether requests arrive to the server (they should be shown in the main window under Events.

If it turns out that Map prefers some other URL scheme than the one used in the server currently, we can add some simplified URL scheme under

http://localhost:8553/v1/tile_simple/

or something similar. That's very easy.
 

The Following 3 Users Say Thank You to rinigus For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#245
Originally Posted by jdrescher View Post
I would like to use OSM Scout Server for providing map informations but unfortunately it does not work.
SFOS still has QtLocation 5.2. That "osm.mapping.host" parameter was added in 5.6. Documentation for QtLocation 5.2 is not officially available, but maybe Ubuntu 15.04 might be close. But note that Jolla has backported individual commits and updated individual things like the HERE plugin, so it's understandably quite difficult to figure out.

What you're trying to do is (to my knowledge) simply not possible with the SFOS version of QtLocation. My advice would be to wait for QtLocation 5.6 (maybe we need a new community IRC pressure meeting?) or if you can't wait, ask Martin about his pure QML component. Poor Maps uses QtLocation's Map component, but has custom tile loading to work around stuff like this, but that's not designed to be reusable.
 

The Following 4 Users Say Thank You to otsaloma For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#246
Originally Posted by otsaloma View Post
SFOS still has QtLocation 5.2. That "osm.mapping.host" parameter was added in 5.6. Documentation for QtLocation 5.2 is not officially available, but maybe Ubuntu 15.04 might be close. But note that Jolla has backported individual commits and updated individual things like the HERE plugin, so it's understandably quite difficult to figure out.

What you're trying to do is (to my knowledge) simply not possible with the SFOS version of QtLocation. My advice would be to wait for QtLocation 5.6 (maybe we need a new community IRC pressure meeting?) or if you can't wait, ask Martin about his pure QML component. Poor Maps uses QtLocation's Map component, but has custom tile loading to work around stuff like this, but that's not designed to be reusable.
I must say that situation with QtLocation on SFOS is frustrating. Its probably a naive question but I am going to ask it anyway: now, when we have Qt5.6, is it possible to compile missing QtLocation 5.6 and add it ourself via OpenRepos or other distribution mechanism? @otsaloma, you have been following for a while, do you know whether it is possible?


To keep you in the loop and give an overview of the server development:

On the server side, I have been working on making it simple to use it with multiple maps. Rendering of the maps has been resolved already with Mapnik. Now I have added support for search using the data from all available maps. This is done for geocoder-nlp backend.

Finally, I think I know how to get routing through multiple maps supported as well. Namely, I am planning to incorporate Valhalla (routing engine behind Mapzen routing solution). After few days of porting, I managed to run the first routing tests using valhalla's program on SFOS device. Calculation of a route from Stockholm (Sweden) to Aarhus (Denmark) took just 2 seconds on Nexus 4. That's compared to ~45 seconds on the same device on the same route when using libosmscout. Not sure whether valhalla is always faster, but the start is promising. In addition to speed, valhalla routing engine allows us to "glue" the countries/territories together solving the long-standing issue of routing between countries.

There are several technical issues to be resolved with the adaptation of Valhalla, but it should be possible. Also we would have to discuss with @otsaloma and @MartinK few technical choices on how to do that when I know a bit more about Valhalla requirements.

I might make one more release before adding Valhalla to push out support for search in all maps and catch up with the advances in libosmscout.
 

The Following 5 Users Say Thank You to rinigus For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#247
Originally Posted by rinigus View Post
I must say that situation with QtLocation on SFOS is frustrating. Its probably a naive question but I am going to ask it anyway: now, when we have Qt5.6, is it possible to compile missing QtLocation 5.6 and add it ourself via OpenRepos or other distribution mechanism? @otsaloma, you have been following for a while, do you know whether it is possible?
I don't actually know if it's possible, but looking the commit activity, there's a lot of fixes related to e.g. geoclue positioning, and just using upstream 5.6 might not work well on all devices and trying to port those patches to 5.6 might be difficult. Additionally, there are API changes between 5.2 and 5.6, which means upgrading would break many apps written for 5.2. The API changes are small and it's easy to adapt to them, but it might be difficult for app authors to support both versions.

Also note, that this problem of using using a custom tile source, e.g. OSM Scout Server, is only partially served by the OSM plugin in QtLocation 5.6. It allows you to set the host, e.g. "http://tile.openstreetmap.org/" in "http://tile.openstreetmap.org/{z}/{x}/{y}.png", but the requested URL will always end in "{z}/{x}/{y}.png". What we'd really need is a plugin that supports a template URL string, so that you can have X, Y and Z as URL parameters instead of path components or additional parameters like day/night or API keys etc. And also, a plugin parameter for tile size so that the requested tiles can be shown correctly. A custom QtLocation plugin would be easy to distribute separately, e.g. at OpenRepos, but probably difficult to use in Harbour apps.
 

The Following 5 Users Say Thank You to otsaloma For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#248
Originally Posted by otsaloma View Post
I don't actually know if it's possible, but looking the commit activity, there's a lot of fixes related to e.g. geoclue positioning, and just using upstream 5.6 might not work well on all devices and trying to port those patches to 5.6 might be difficult. Additionally, there are API changes between 5.2 and 5.6, which means upgrading would break many apps written for 5.2. The API changes are small and it's easy to adapt to them, but it might be difficult for app authors to support both versions.

Also note, that this problem of using using a custom tile source, e.g. OSM Scout Server, is only partially served by the OSM plugin in QtLocation 5.6. It allows you to set the host, e.g. "http://tile.openstreetmap.org/" in "http://tile.openstreetmap.org/{z}/{x}/{y}.png", but the requested URL will always end in "{z}/{x}/{y}.png". What we'd really need is a plugin that supports a template URL string, so that you can have X, Y and Z as URL parameters instead of path components or additional parameters like day/night or API keys etc. And also, a plugin parameter for tile size so that the requested tiles can be shown correctly. A custom QtLocation plugin would be easy to distribute separately, e.g. at OpenRepos, but probably difficult to use in Harbour apps.
@otsaloma, thank you very much for this explanation! I don't know much about it, but would try to read up on QtLocation in future.

What's telling is that there has been no activity visible with QtLocation 5.6. From this maybe we can conclude that we should not expect situation change in a short term.
 

The Following User Says Thank You to rinigus For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#249
Originally Posted by rinigus View Post
What's telling is that there has been no activity visible with QtLocation 5.6. From this maybe we can conclude that we should not expect situation change in a short term.
Yes, that's likely true. I get the impression that Jolla has been busy with Xperia and other adaptations, leaving that QtLocation upgrade for later.
 

The Following 3 Users Say Thank You to otsaloma For This Useful Post:
Posts: 58 | Thanked: 223 times | Joined on Apr 2017 @ Germany
#250
Thanks for the infos.
I have a lot of features to implement so I can wait a little longer.

All in all for developers it's still a sad situation after so many years with SFOS. You can't even release a bluetooth app into the harbour.
I think Jolla should make it as easy as possible for developers. Instead they are doing it the other way around
 

The Following 5 Users Say Thank You to jdrescher For This Useful Post:
Reply

Tags
geocoder, linux, offline maps, router, sailfish os, tiles


 
Forum Jump


All times are GMT. The time now is 20:09.