Pure Maps (Native map app)

Thank you for your answer and for encourage me using HERE.
I now got it right with the API key.
However, HERE map is sometimes working, sometimes not (sometimes, map is displayed, sometimes, only white with my POI only).
HERE routing is not finding places, and never does (in contrary to HERE maps which sometimes work).
Both situations report a 403 error when I launch PM from command line.

About routing feedback, the provider used is stadia maps.
Strangely, I couldn’t have any informations about tolls at OSM.org . All routes that are calculated don’t mention tolls.

I think something is still wrong if you get 403 error. maps may work via cache - so not the best indicator.

Thank you for your answer, Rinigus.
I believe the HERE map is working. It was just not displaying until I cancelled the previous routing that was still there.

Although error massages in the log, it is also working when I zoom somewhere I never looked, some thousands km away.
Here is the log of these above working steps (launch and zoom somewhere).

Current locale: en_GB
Translation not found
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Got library name: “/usr/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so”
[I] unknown:0 - Acquired QGeoPositionInfoSource: “geoclue”
[D] unknown:0 - Tracking “io.github.rinigus.OSMScoutServer”
[W] unknown:71 - file:///usr/share/harbour-pure-maps/qml/PositionSource.qml:71: TypeError: Cannot read property ‘center’ of null
[D] onCompleted:580 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[D] unknown:0 - Geoclue client path: “/org/freedesktop/Geoclue/Master/client5”
[W] unknown:91 - file:///usr/share/harbour-pure-maps/qml/pure-maps.qml:91:5: QML PositionSource: Binding loop detected for property “active”
[W] unknown:0 - Positioning update timeout
[W] unknown:0 - Translation not found for navigator: “en”
Started DBus service at io.github.rinigus.PureMaps
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - [ INFO ] “{unknown}[General]: GPU Identifier: Adreno ™ 508”
[W] unknown:0 - [ ERROR ] “{unknown}[Style]: Failed to load tile 0/0/0=>0 for source raster: HTTP status code 400”
[W] unknown:0 - QConnmanTechnologyInterface::scanReply() “Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.”
Establishing connection to revgeocode.search.hereapi.com
GET failed: Exception: Server responded 403: ‘Forbidden’
Geocoding failed:
Traceback (most recent call last):
File “/usr/share/harbour-pure-maps/poor/geocoder.py”, line 180, in reverse
results = self._provider.reverse(x=x, y=y, radius=radius, limit=limit, params=params)
File “/usr/share/harbour-pure-maps/geocoders/here.py”, line 198, in reverse
results = poor.http.get_json(url)[“items”]
File “/usr/share/harbour-pure-maps/poor/http.py”, line 232, in get_json
return _request_json(“GET”,
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 293, in _request_real
raise Exception(“Server responded {}: {}”.format(
Exception: Server responded 403: ‘Forbidden’
Quitting
Calling http.pool.terminate
Calling poor.conf.write
Calling self.history.write
Closing voice engines
All quit methods called

But then, when I try to route, no places are found.
Here is the log (launch, press the route icon, enter a place name):

Current locale: en_GB
Translation not found
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Got library name: “/usr/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so”
[I] unknown:0 - Acquired QGeoPositionInfoSource: “geoclue”
[D] unknown:0 - Tracking “io.github.rinigus.OSMScoutServer”
[W] unknown:71 - file:///usr/share/harbour-pure-maps/qml/PositionSource.qml:71: TypeError: Cannot read property ‘center’ of null
[D] onCompleted:580 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[D] unknown:0 - Geoclue client path: “/org/freedesktop/Geoclue/Master/client6”
[W] unknown:91 - file:///usr/share/harbour-pure-maps/qml/pure-maps.qml:91:5: QML PositionSource: Binding loop detected for property “active”
[W] unknown:0 - Positioning update timeout
[W] unknown:0 - Translation not found for navigator: “en”
Started DBus service at io.github.rinigus.PureMaps
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - [ INFO ] “{unknown}[General]: GPU Identifier: Adreno ™ 508”
[W] unknown:169 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:169: TypeError: Cannot read property ‘backIndicatorDown’ of null
[W] unknown:164 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:164: TypeError: Cannot read property ‘backIndicatorDown’ of null
[W] unknown:224 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:224: TypeError: Cannot read property ‘forwardIndicatorDown’ of null
[W] unknown:219 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:219: TypeError: Cannot read property ‘forwardIndicatorDown’ of null
Establishing connection to autosuggest.search.hereapi.com
GET failed: Exception: Server responded 403: ‘Forbidden’
Autocomplete failed:
Traceback (most recent call last):
File “/usr/share/harbour-pure-maps/poor/geocoder.py”, line 81, in autocomplete
results = self._provider.autocomplete(query=query, x=center_x, y=center_y, zoom=zoom, params=params)
File “/usr/share/harbour-pure-maps/geocoders/here.py”, line 61, in autocomplete
results = poor.http.get_json(url)[“items”]
File “/usr/share/harbour-pure-maps/poor/http.py”, line 232, in get_json
return _request_json(“GET”,
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 293, in _request_real
raise Exception(“Server responded {}: {}”.format(
Exception: Server responded 403: ‘Forbidden’
Establishing connection to discover.search.hereapi.com
GET failed: Exception: Server responded 403: ‘Forbidden’
Geocoding failed:
Traceback (most recent call last):
File “/usr/share/harbour-pure-maps/poor/geocoder.py”, line 143, in geocode
results = self._provider.geocode(query=query, x=center_x, y=center_y, zoom=zoom, params=params)
File “/usr/share/harbour-pure-maps/geocoders/here.py”, line 85, in geocode
results = poor.http.get_json(url)[“items”]
File “/usr/share/harbour-pure-maps/poor/http.py”, line 232, in get_json
return _request_json(“GET”,
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 293, in _request_real
raise Exception(“Server responded {}: {}”.format(
Exception: Server responded 403: ‘Forbidden’
[W] unknown:0 - QConnmanTechnologyInterface::scanReply() “Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.”
Quitting
Calling http.pool.terminate
Calling poor.conf.write
Calling self.history.write
Closing voice engines
All quit methods called

Actually, have you accepted HERE license? Its in settings/licenses. Maybe on the first start you declined it?

PS: Not sure it is that. still feels something is wrong with API key. Try to look into HERE API and test their examples with your key. Check out for that Pure Maps HERE geocoder - that one is relatively simple

2 Likes

I started in terminal, following the output in terminal

Pure maps is getting started, but here map ia not getting loaded…

Could yiu please suggest, if i need to install something, in terminal its showimg few things missing.

Yes, I have accepted the license.
I obtained the API key following this guide:
https://developer.here.com/tutorials/getting-here-credentials/
The API key seems to (partially?) work as I can now display HERE maps in Pure Maps.

Well, my skills are what they are…
Really trying hard, searching in the phone directories and on the net a lot.
But probably missing things: I can’t run/test geocoder scripts located in /usr/share/harbour-pure-maps/geocoders because I always get poor missing:

9:53 defaultuser@XperiaXA2-DualSIM /usr/share/harbour-pure-maps/geocoders% python ./here.py
Traceback (most recent call last):
File “./here.py”, line 25, in import poor
ModuleNotFoundError: No module named ‘poor’

The same when try instructions in python (also tried all python versions directly)

However, If I understand correctly this page, one can test an API key into a browser.
In the PC browser I enter:

https://geocode.search.hereapi.com/v1/geocode?q=240+Washington+St.%2C+Boston&limit=4&apiKey=*******

(with my API key instead of the *******)

I get an answer saying:

|error|“Forbidden”|
| — | — |
|error_description|“These credentials do not authorize access”|

I don’t find other simple ways to test my API key at the moment.

No need to browse on device, see here: pure-maps/here.py at master · rinigus/pure-maps · GitHub

So, as a test URL you can try:

https://discover.search.hereapi.com/v1/discover?apiKey=XXX&q=Helsinki&at=59,24

HERE requires reference point as well, which I added at the end of the query.

Try with your API key. My key is bit more than 40 chars - just telling so you could differentiate between different used keys.

Oh, lovely, thanks.
Unfortunately, I get a “Forbidden” and “These credentials do not authorize access”.

However, if I change my API key by replacing one char by a random one, I get an “Unauthorized” and “apiKey invalid. apiKey not found.”.

I a way, i guess it is a good sign.
My API key is recognised but seem to not allow this service.

Oh, got it finally ! :partying_face:
Thanks Rinigus for your patience and help!

So, to sum up for the next ones who need a HERE API key for maps and routing:

  1. Follow the steps described here to create a project anf get an API key:
    https://developer.here.com/tutorials/getting-here-credentials/

  2. Click on “Edit App”

  3. Untick “Allow access only in this project” like below

edit: little hickup: HERE traffic map type (layer) is not displaying.
Other types like Default, Satellite, Terrain and Hybrid are working.
403 again. I’ll go back to my HERE account to check if I find something specific about traffic.

4 Likes

It would be great if you could document all steps and then submit as a howto into Pure Maps repository. That would be helpful for users on other platforms as well

1 Like

Do you mean about how to get the API key?

And how to make it work with the new platform website. When you get it working for longer time :slight_smile:

2 Likes

Sorry, imagination limited. You mean the new HERE platform website, I guess.
Yes, ok, I’ll use it these next days to go to work. I I don’t get fired for late arrival, I’ll do it. :joy:
As new discussion here, right? https://github.com/rinigus/pure-maps/discussions

Just: any idea about the HERE traffic type/layer not displaying?

1 Like

Traffic layer is working just fine here.

It seems like there is something in the new platform.here.com which makes API key registration and making work non-trivial. So, when you get it sorted out in a way that all works, please share the steps that you did. You can do it under GitHub discussions or add as a doc under pure-maps/docs at master · rinigus/pure-maps · GitHub

2 Likes

I would like to say that Pure Maps is a matured daily Driver Navigation App for me which is fun and joy to use on my XZ2 Compact. Thank you Rinigus and others who maintain this gem.

9 Likes

I have exactly the same issue as you.

@ric9k and @carmenfdezb - looks like something changed in HERE. Don’t know what exactly, but switch to platform may have disabled some services for free. I suggest to look into documentation and check how traffic data is advertised. Seems like routing doesn’t work either with the new keys. One more reason to develop keypeer.org (@poetaster)

2 Likes

On it :0 Recently @mad_dev suggested twitter is now also a candidate and I can’t imagine it will become less :slight_smile: Please suggest use cases a https://forum.sailfishos.org/t/third-party-api-keys-and-keypeer every api people suggest will give us a better case for finding support to fund it :slight_smile:

1 Like

As for traffic, I am sure HERE somewhere provides it in their new Platform.here.com API as well . So, please check docs and see how to enable it. To see traffic overlay, you could also try to use Mapbox.com. That will show traffic, but its not connected to routers in Pure Maps - not sure they have it linked to routers.