When I want to get the API key from here they want me to add a payment method. Is the number of requests locked or will here automatically charge me when i reach the threshold?
Quick question: I still don’t get any GPS Update in Puremaps (XA2). Hence I cant use it for navigation. At the same time OSM Scout has access to GPS and updates my position. There were some posts in the forum, that explained this with OS Update and delayed release of SDK or something similar. Does this still hold true or are others able to use GPS signal within PureMaps?
The last sentence is garbled. Could you edit it please?
Generally speaking I’m looking for a way to make GPS better on my X10 II; I rarely use it but the few times a year I activate it it does not work even after - idk, maybe 10 minutes.
Everything is fine here with OS 5.0.0.68 and on the Sony X10 III. GPS seems to get a faster fix with the app GPSInfo started. In sensitive cases i run both apps (pureMaps and GPSInfo) together.
Hello,
I have a question regarding sharing of routes/places between Desktop and Pure Maps. Before an upcoming travel event I often have different locations I need to bookmark. This process usually happens on my Laptop (here.maps; google maps etc.). Afterwards I have to look the places up again in Pure Maps - where I sometimes need different search strings (e.g. hotel name not in db). This takes quite some time.
My question is, what are your routines to share locations/routes from Desktop to Sailfish. In an ideal scenario I would use a map service with login where I can bookmark a place, that is synced.
I’m not a fan of online accounts personally, but I do have my own Nextcloud.
Personally I’d make contacts in Nextcloud for each important location or event, with the right address saved to each contact. (Literally things like 1st week Hotel, 2nd week Hotel, etc.)
They are grouped; so afterward the whole group can be deleted if that’s needed. These contacts automatically get two-way synced to SFOS; so any changes made there will update on NC, etc.
Then from your people app in SFOS you can just tap the address and get asked which satnav sofware you want to use for navigating there.
Is it Spartan? Sure. Does it work? Works for me. Is it privacy friendly? Oh yeah.
For smaller one-shot things I don’t do this, I use KDE Connect on my PC together with Sailfish Connect on SFOS; copy the address I need on my PC, paste it on my phone with clipboard synchronization.
Why don’t you install pure maps on your desktop? It’s available as flatpak if I’m not mistaken. Once you have all your pins you can copy the xml file with all the location on your phone and that’s about it. I could give you more precise instructions later if needed, I’m not in front of my pc right now
Very basic, almost prehistoric : I grab the coordinates on my PC, send them to the phone via Signal-Whisperfish or Telegram-Fernschreiber and search for these coordinates into Pure Maps and set a PIO.
if you encounter issue with stadiamaps online routing, api has changed, use this to fix:
diff --git a/routers/stadiamaps.py b/routers/stadiamaps.py
index 8659786..c9e0e73 100644
--- a/routers/stadiamaps.py
+++ b/routers/stadiamaps.py
@@ -108,8 +108,8 @@ MODEOPTIONS = {
"transit": ["use_bus", "use_rail", "use_transfers"]
}
-URL = "https://route.stadiamaps.com/route?api_key=" + poor.key.get("STADIAMAPS_KEY") + "&json={input}"
-URL_OPT = "https://route.stadiamaps.com/optimized_route?api_key=" + poor.key.get("STADIAMAPS_KEY") + "&json={input}"
+URL = "https://api.stadiamaps.com/route/v1?api_key=" + poor.key.get("STADIAMAPS_KEY")
+URL_OPT = "https://api.stadiamaps.com/optimized_route/v1?api_key=" + poor.key.get("STADIAMAPS_KEY")
cache = {}
def prepare_endpoint(point):
@@ -147,16 +147,18 @@ def route(locations, params):
costing_options=costing_options,
directions_options=dict(language=language, units=units))
- input = urllib.parse.quote(json.dumps(input))
+ input = json.dumps(input)
if optimized:
url = URL_OPT.format(**locals())
else:
url = URL.format(**locals())
with poor.util.silent(KeyError):
return copy.deepcopy(cache[url])
- result = poor.http.get_json(url)
+ result = poor.http.post_json(url, body=input, headers={"Content-Type": "application/json"})
result = poor.AttrDict(result)
mode = MODE.get(ctype,"car")
+ # set new unique url
+ url = url + "_" + input
return parse_result_valhalla(url, locations, optimized, result, mode)
def parse_exit(maneuver, key):
(works with git apply or edit manually)
This is beautiful!
Many thanks ![]()
edit: Oops, it seems not to work for me (XA2).
Is an API key for stadiamaps needed now? (I never used one for routing)
Here is the output
Establishing connection to route.stadiamaps.com
POST failed: InvalidURL: URL can’t contain control characters. ‘/route?api_key=f0782c85-8dd3-4855-b068-xxxxxxxxxxxx&json={“locations”: [{“lat”: 50.05554967249382, “lon”: 4.2215094990616935, “name”: “Chauss\u00e9e de Chimay”, “type”: “break_through”}, {“lat”: 50.2238088911978, “lon”: 3.772738101437459, “name”: “Brai des Hommes”, “type”: “break”}], “costing”: “auto”, “costing_options”: {“auto”: {“use_ferry”: 0.5, “use_highways”: 0.5, “use_tolls”: 0.5}}, “directions_options”: {“language”: “en-US”, “units”: “kilometers”}}’ (found at least ’ ')
Routing failed:
Traceback (most recent call last):
File “/usr/share/harbour-pure-maps/poor/router.py”, line 134, in route
route = self._provider.route(locations=locations, params=params)
File “/usr/share/harbour-pure-maps/routers/stadiamaps.py”, line 157, in route
result = poor.http.post_json(url, body=input, headers={“Content-Type”: “application/json”})
File “/usr/share/harbour-pure-maps/poor/http.py”, line 250, in post_json
return _request_json(“POST”,
File “/usr/share/harbour-pure-maps/poor/http.py”, line 327, in _request_json
text = _request(method, url, body, encoding, retry, headers)
File “/usr/share/harbour-pure-maps/poor/http.py”, line 258, in _request
return thread_pool.request(method=method, url=url, body=body,
File “/usr/share/harbour-pure-maps/poor/http.py”, line 213, in request
if ‘exception’ in result: raise result[‘exception’]
File “/usr/share/harbour-pure-maps/poor/http.py”, line 166, in _request_worker
result = _request_real(method=task[‘method’], url=task[‘url’],
File “/usr/share/harbour-pure-maps/poor/http.py”, line 287, in _request_real
connection.request(method, path, body, headers=headall)
File “/usr/lib/python3.8/http/client.py”, line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.8/http/client.py”, line 1267, in _send_request
self.putrequest(method, url, **skips)
File “/usr/lib/python3.8/http/client.py”, line 1101, in putrequest
self._validate_path(url)
File “/usr/lib/python3.8/http/client.py”, line 1201, in _validate_path
raise InvalidURL(f"URL can’t contain control characters. {url!r} "
http.client.InvalidURL: URL can’t contain control characters. ‘/route?api_key=f0782c85-8dd3-4855-b068-xxxxxxxxxxxx&json={“locations”: [{“lat”: 50.05554967249382, “lon”: 4.2215094990616935, “name”: “Chauss\u00e9e de Chimay”, “type”: “break_through”}, {“lat”: 50.2238088911978, “lon”: 3.772738101437459, “name”: “Brai des Hommes”, “type”: “break”}], “costing”: “auto”, “costing_options”: {“auto”: {“use_ferry”: 0.5, “use_highways”: 0.5, “use_tolls”: 0.5}}, “directions_options”: {“language”: “en-US”, “units”: “kilometers”}}’ (found at least ’ ')
(I changed the API key number, just… because I don’t know if it’s identifiing something or not…)
own api key shouldnt be needed (but I do use my own but did test without, can test again. Default key works for me), I dont get the error, just
Started DBus service at io.github.rinigus.PureMaps
[D] init:78 - Initializing voice engine navigator en female
[D] init:83 - Voice engine: navigator active=false
[D] init:78 - Initializing voice engine navigator en female
[D] init:83 - Voice engine: navigator active=false
[W] unknown:0 - Positioning update timeout
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - [ INFO ] "{unknown}[General]: GPU Identifier: Adreno (TM) 619"
[W] unknown:0 - QObject::startTimer: Timers cannot have negative intervals
[W] unknown:0 - QObject::startTimer: Timers cannot have negative intervals
[W] unknown:175 - file:///usr/lib64/qt5/qml/Sailfish/Silica/DialogHeader.qml:175: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:169 - file:///usr/lib64/qt5/qml/Sailfish/Silica/DialogHeader.qml:169: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:240 - file:///usr/lib64/qt5/qml/Sailfish/Silica/DialogHeader.qml:240: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:235 - file:///usr/lib64/qt5/qml/Sailfish/Silica/DialogHeader.qml:235: TypeError: Cannot read property 'forwardIndicatorDown' of null
Establishing connection to api.stadiamaps.com
[D] init:78 - Initializing voice engine navigator de_DE female
[D] init:83 - Voice engine: navigator active=false
[D] unknown:0 - Loaded translation for navigation "de_DE"
[D] unknown:0 - Reset locations true 0 2
[W] unknown:0 - [ ERROR ] "{unknown}[General]: The resource `https://tiles.openfreemap.org/fonts/Open%20Sans%20Regular/0-255.pbf` not found"
[W] unknown:0 - [ ERROR ] "{unknown}[Style]: Failed to load glyph range 0-255 for font stack Open Sans Regular: HTTP status code 404"
output after I see route to endpoint on map
you could test print used url before http.post is send, maybe it contains an error
edit:
in your error message there is also “‘/route?api_key=”, not “route/v1?api_key” ?
edit2:
maybe remove lat/lon if you dont want to share that position
Thanks. I took random positions.
I’m wandering if we perhaps don’t have the same version, due to different devices? (XA2 here)
Indeed, I have /route?api_key=. Can I change this URL part in some file?
maybe you didnt see them
e.g.
OLD: -URL = "https://route.stadiamaps.com/route?api_key=" + poor.key.get("STADIAMAPS_KEY") + "&json={input}"
OLD: -URL_OPT = "https://route.stadiamaps.com/optimized_route?api_key=" + poor.key.get("STADIAMAPS_KEY") + "&json={input}"
NEW: +URL = "https://api.stadiamaps.com/route/v1?api_key=" + poor.key.get("STADIAMAPS_KEY")
NEW: +URL_OPT = "https://api.stadiamaps.com/optimized_route/v1?api_key=" + poor.key.get("STADIAMAPS_KEY")
(also dont forget to change the other lines. 2 need change 1 additional line to get an id for cache)
![]()
I indeed forgot them.
So I started everything over and patched (a fresh original file) instead of replacing manually.
Copied your diff and saved to /some_path/stadia.patch
patched with
patch -p1 /usr/share/harbour-pure-maps/routers/stadiamaps.py /some_path/stadia.patch
Many thanks @mive for the patience and for this trick!
And what about PR? 20 chars
I’ll make one but may take till sunday
Corresponding PR was submitted last night by vetzki and I have released Pure Maps 3.4.2 with it. Available at Chum, soon Flathub, and soonish at Jolla Store.
Thanks!
Oh, many thanks.
(never mind if I repeat myself) Pure Maps is wonderful. IMHO an important part of what makes SFOS daily useful, delicious and valuable.
I could perhaps still use a paper/book map for my private use, in order to avoid using private-life-sharing-OSes.
But not for work.
Thanks to PM, I can keep my phone only, all the time. And that’s really cooool ![]()
