HERE reverse geocoding problem

Started by jmsantos, October 19, 2023, 09:34:40 AM

Previous topic - Next topic

jmsantos

Hello.

I'm trying reverse geocoding with HERE, but it always gives the same error:

IMatch could not establish a connection with the geocoding service at HERE.
The server may be unavailable or too busy. Please try again later.

I followed the steps to register in HERE and activate an REST API KEY (I think I did it right, it is more complex than the instructions say). I've been trying it for a while now at different times, but I've never gotten any results.


Mario

HERE returns the status code 406 which means "Not Acceptable". I assume something with your credentials is not in order.
See HERE Maps API Key for more information about how to input your key.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jmsantos

I have read that help many times and followed the steps over and over again.

In case I had done something wrong, I created the API KEY again. The result is always the same.

Mario

Things that come to mind:
Have you set any access restrictions or trusted domains?
You need a REST API key, not a JavaScript API key when I recall correctly.
HERE now uses a single API key, no longer the app-id:app-code schema.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jmsantos

I have checked and I don't see any restrictions nor is Trusted Domain activated.
I have created a single REST API KEY, not JavaScript.

I have also tried the Jingo's Super GeoLocator app
https://www.photools.com/community/index.php/topic,9093.msg68650.html#msg68650

This message appears in the Output panel:

H.service.GeocodingService is deprecated and will be removed soon. Use HERE Geocoding and Search API v7 instead.
done
Error

Maybe IMatch needs an update to the Reverse Geocoding service with HERE?

Mario

#5
Reverse geocoding works fine here, just tried.
No deprecation messages, no warnings in the result, just plain geocoding response data.

HERE is the least used service (by a wide margin) in the IMatch user base. Over 95% use either Google or GeoNames.
HERE is also the least used map provider. I'm always pondering to drop support for HERE completely.

IMatch uses the geocoder API, not something called "H.service.GeocodingService"...?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

I just tried this as well using the standard reverse Geocode and my app and both provide correct info.  I do see in the output panel a deprecation message.. but actually it is for google.maps:

google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead: https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener

The feature will continue to work and there is no plan to decommission it.


Mario

#7
The code running in the map panel comes from Google.
The Map panel loads the sources directly from the Google Servers and should just get the "latest" all the time.
From time to time I migrate everything to their latest API versions and map code, if there is new stuff.
Then it takes usually just a few weeks before the next warning / migration message appears.
Google is changing their stuff all the time, abandoning older things faster than you can say "abandon" ;)
See the Google Cemetery for more info.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jmsantos

I was trying to use HERE service because Geonames does not provide satisfactory results for me.
Although HERE has few users on IMatch, I have read in this community several good comments.
However, no matter how hard I try, it still doesn't work.

The error I mentioned above appeared in the Output Panel when using the Jingo's app Super GeoLocator:
H.service.GeocodingService is deprecated and will be removed soon. Use HERE Geocoding and Search API v7 instead.

HERE is migrating registrations in Developer to Platform. I don't know if it has anything to do with it.

Mario

I have no idea.
I tried HERE on two systems and it works fine. The most recent API version is 7 and IMatch is currently using 6.2, I believe. But that is a fully supported version.

I've also tried the queries IMatch builds and sends to HERE with the Windows command line tool curl, and they also work. No deprecation warnings, no errors, just proper location data.

No problem reports from other users using HERE, although there are only a few...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#10
I seem to be one of the few who sometimes uses HERE maps. (I use HERE more w/ a computer mapping program, QGIS.)

I hadn't updated my HERE API in IM until today, but I'm having a problem w/ the Map window: The Map window only shows black now instead of a map view, w/ all the HERE map options (no error messages). But the Map window shows that HERE map tile is being used. 

Log attached, in case it's useful. At 10.19 13:50:20, there's mention of GetLocations.
John

Mario

The log is clean.
Anything in the App Output Panel?

Open your web browser and press <F12> to open the developer tools.
Make sure the "Console" tab is enabled.
IMatch must be running.
Now navigate to this URL: http://127.0.0.1:50519/imatch/apps/FEATURES/mapapp/index.html
This will open the map panel in your browser.
Look at the console tab for error messages from HERE.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Here's a screenshot of the console messages. 
John

Mario

That's not the Console tab. The Console tab is two tabs left of the tab in your screen shot.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#14
Oops! Here are two screenshots showing the top and bottom of the console error messages. (Is there a better way to capture this info?)

The error message link says:
{"error":"Unauthorized","error_description":"apiKey invalid. apiKey not found."}



So apparently there's an issue w/ the API key, or at least how I recorded it in IM. Not sure why this is happening, given that it apparently works with my other (GIS) software.

Here's the 'sanitized' version of the information HERE sent me after migrating me to the new API:

Resolution Notes: Conversion succeeded.Current state of converted apps:

Src. AppId Src. AppName Dest. AppHrn Dest. AppName Dest. Description
[New code nmnmnmmmnn] Freemium 2019-06-09 hrn:here:account::org[org ID #]:app/[New code nmnmnmmmnn] Freemium 2019-06-09 REST


John

Mario

Try to create a new API key and enter it.
Note that new (for a few years) API keys are a single key, not longer using the "app-id:key" format.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima

Hi all:
I had the same problem. Switched to google maps. Today I give Here a try...
This is what I did:
Went here :  platform.here.com
After logging, click on Goto Access Manager
Click in one of your name's app. Opens a new page where you can see in front of enabled 3 dots. Click and choose Delete.
Do the same for all your name's app. ( I had four...)
After that, choose one of your apps click on it and on the the new page choose Create Credentials.
It will create your new API key. 
I did this only for one app, all the others don't have any API key.
Copy it to IMatch.
Now I can see the maps insted of the black screen...



Mario

Thanks. Hopefully this helps the other users with the same problem.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#18
@zematima - thank you for sharing this. Unfortunately, after I created a new HERE access key and pasted it into IMatch, I'm still seeing the same black screen (and same 404 error messages in the console).

I'm not sure how to proceed next...

I got the following in my HERE credential for my IMatch key:
here.user.id = aaa
here.client.id = bbb
here.access.key.id = ccc
here.access.key.secret = ddd
here.token.endpoint.url = https://account.api.here.com/oauth2/token

I used the here.access.key.id in IM preferences...
John

zematima

Hi:
Now with some pictures:
Go to the provided link on the picture 1.jpg. (https://platform....) and click on the Go To Access Manager.
On picture 2.jpg click on the app you want to create the key.
On picture 3.jpg first delete the existing key (the 3 dots at your right, not shown in the picture) and all the other keys in other apps (if you have them).
I had 4 apps (2.jpg) and deleted all the keys they had and then choosed one app to create the new key.
The key IMatch needs is the one under ACCESS KEY ID
Paste it to IMatch and the result is in picture 4.jpg
Watch the slide of the zoom.
Best regards,
JRosa