The Following 4 Users Say Thank You to MartinK For This Useful Post: | ||
|
2017-12-11
, 21:58
|
Posts: 1,746 |
Thanked: 1,832 times |
Joined on Dec 2010
|
#32
|
Looking on how modRana does it (warning: modRana does some extra stuff there so the code is ore complex than necessarily needed) & trying to remember how I programmed it:
- the PositionSource element has a coordinate property, which holds the current coordinate
- the coordinate has a isValid property, which is used by modRana to decide if the coordinate is valid and should be used
- to differentiate between 2D and 3D fix, modRana uses the altitudeValid property of the PositionSource instance
That seems to work reasonably well.
But it also depend how you define "has a fix" as by default the location backend on Sailfish OS first uses data from the mobile network and WiFi to get a rough position estimate while getting and actual GPS lock.
This is why you might see you position jump every 30 seconds for tens or hundreds of meters before it actually starts to track you position. It's the location backend sending data about local WiFi access points every 30 seconds to estimate your position while GPS is still acquiring the GPS lock.
The Info -> Location page in modRana displays detailed location data and you can nicely see the location converge from WiFi estimation to GPS fix there.
The Following 2 Users Say Thank You to m4r0v3r For This Useful Post: | ||
|
2017-12-15
, 13:15
|
Posts: 58 |
Thanked: 223 times |
Joined on Apr 2017
@ Germany
|
#33
|
I would suggest to install
https://build.merproject.org/package...s/mapboxgl-qml and just use MapboxMap together with the gesture area as in https://github.com/rinigus/mapbox-de...y/MainPage.qml . Then you don't even need to include MapboxGL as a submodule, can use regular gcc, and its all very simple. mapboxgl-qml would register the module in the system and all should just work. Please report bugs if it doesn't.
[ERROR] {QSGRenderThread}[Setup]: loading style failed: Problem with the SSL CA cert (path? access rights?): error setting certificate verify locations: CAfile: ca-bundle.crt CApath: none
|
2017-12-15
, 13:32
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#34
|
HI rinigus!
I am following your instructions but there is an error when opening the map page:This is what I did:Code:[ERROR] {QSGRenderThread}[Setup]: loading style failed: Problem with the SSL CA cert (path? access rights?): error setting certificate verify locations: CAfile: ca-bundle.crt CApath: none
- installed mapboxgl-qml-1.1.0-10.27.1.jolla.armv7hl.rpm on the device (Oneplus X)
- took your basic example from here
Maybe there is a problem with the access token?
|
2017-12-15
, 14:31
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#35
|
|
2017-12-15
, 19:51
|
Posts: 58 |
Thanked: 223 times |
Joined on Apr 2017
@ Germany
|
#36
|
|
2017-12-15
, 20:25
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#37
|
OK thanks, I will try to make it work with OSM Scout server. Just a few more questions:
- Jolla 1 won't work with MapBox, right?
- OSM Scout Server: user has to decide if he wants to keep the classic map or a vector map for MapBox. Is it possible to keep both maps on the phone (although that would need very much space on the SD card)?
- if I want to release my app with the MapBox QML component, the users also need mapboxgl-qml-1.1.0-10.27.1.jolla.armv7hl.rpm on their devices. How can I deliver it to them? Do they have to install it manually?
|
2017-12-15
, 20:28
|
Posts: 213 |
Thanked: 414 times |
Joined on Nov 2010
|
#38
|
As of today, offline support for Mapbox GL vector tiles has been released as a part of OSM Scout Server and the first full-blown application using the widget has been released as a temporary fork of Poor Maps. So, it should be possible to use it daily and the infrastructure for this maps widget is all in place.
The Following User Says Thank You to piggz For This Useful Post: | ||
|
2017-12-15
, 20:44
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#39
|
Does the widget have an api for drawing on the map, using, eg QGeoPath/QGeoShape etc ?
|
2017-12-16
, 05:56
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#40
|
The Following 5 Users Say Thank You to rinigus For This Useful Post: | ||
That seems to work reasonably well.
But it also depend how you define "has a fix" as by default the location backend on Sailfish OS first uses data from the mobile network and WiFi to get a rough position estimate while getting and actual GPS lock.
This is why you might see you position jump every 30 seconds for tens or hundreds of meters before it actually starts to track you position. It's the location backend sending data about local WiFi access points every 30 seconds to estimate your position while GPS is still acquiring the GPS lock.
The Info -> Location page in modRana displays detailed location data and you can nicely see the location converge from WiFi estimation to GPS fix there.
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)