Activate maps

Started by zematima, June 29, 2023, 10:23:51 AM

Previous topic - Next topic

zematima

Hi:
I can't put the maps working correctly.
I created the keys in Here and I have the Access Key ID and Access Key Secret
I put in the field the Access Key ID and the result is what you see in the file Mapa. Shall I put both? How?
I also have a key for Google and Bing but the result is the same.
What am I doing wrong?
Thanks in advance,
JRosa


Mario

For HERE you need to combine <App Id>:<App Code> as per instructions.

Google and Bing use a simple API key.
If you get the "for development purposes only" message, make sure your account has a valid payment method added (e.g. credit card). Accounts without payment method are locked by Google/Bing.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima


zematima

Hi:
Google is very difficult to achieve the account where I can put the credit card. (that they already have)
With Here I put where is the arrow, what Here calls Access Key ID and after the : what Here calls Access Key Secret. After that I go to the maps panel and I choose Here(Sattelite). If I try to find any location IMatch says the supplier is not configured...
Let´s try another one:
GeoNames: Create an account , enabled the free Web Services , put the user name on IMatch. Which map should I choose from the Menu?
Even If I choose Streetmap I can't find anything.
Don't know what to do. 
Any ideas?
Thanks in advance,
JRosa

thrinn

You settings look correct to me and are the same I use (different API key, of course). At least OpenStreetMap should work. But the screenshot of the map looks like you zoomed in very much. If you zoom out (using the vertical slider top left), does that change anything?
Thorsten
Win 10 / 64, IMatch 2018, IMA

Tveloso

Quote from: zematima on June 30, 2023, 10:32:57 PMWith Here I put where is the arrow, what Here calls Access Key ID and after the : what Here calls Access Key Secret. After that I go to the maps panel and I choose Here(Sattelite). If I try to find any location IMatch says the supplier is not configured...
So the map panel is working ok, and it's just searching that does not work, correct?

Despite my being your countryman, I don't know the language, but does look like you have HERE correctly configured as the search provider.  And since Thorsten's setup is the same, and it's working ok for him, perhaps it's something on the HERE side?

I use Google for both, and I recall that when I first set it up (several years ago), I did not have all the correct APIs selected, and things did not work for me right away...perhaps there's something similar with HERE?...(so the map works, but searching requires a different API that you have not enabled?)
--Tony

Mario

QuoteEven If I choose Streetmap I can't find anything.
The search provider and reverse geocoder you use is independent from the map service you use in the Map panel.
Since you have entered a HERE API key, you can use all Maps starting with HERE.

If you try to search using HERE and no API key is available, the Map Panel will display a "Search Provider not configured" message.

If you have a valid HERE key (and the HERE maps work) you can also use HERE to search.
Just tried it and it works with my API key (map and searching).

If you have a GeoNames.org user account and you have enabled it (! this is a step users sometimes overlook), GeoNames.org search will also work.

Same for Google if you a) have a valid API key and enabled the APIs needed.
See API Keys for Maps and Geocoding for details.

Getting an API key is not that easy since all these companies (especially Google) don't care for normal users.
The API key mechanism is designed for developers. Normally, I would get myself a key and then route all map and API requests from IMatch users "through" my server to Google/Bing/HERE, supplying my key. But then I would also have to pay for the API usage of all IMatch users, and that's impossible.

Try this:

1. Open the Map Panel in your web browser (Chrome/Edge preferred) using this URL:

http://127.0.0.1:50519/imatch/apps/FEATURES/mapapp/index.html

2. Press <F12> to open the Developer Tools

3. At the top, click on the "Console" tab (2nd from the left in Chrome/Edge)

4. Try to search for some addresses using HERE
If the service returns an error code, it will be shown in the console window.
That info will be helpful to solve this problem.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima

Thank you all for your help.
Lets see:
GeoName.org -  I have a valid user name for GeoNames.org and the user account is activated. I put my user name on Edit/Preferences... , choose the search supplier and Geo supplier as GeoName.org
After that in the map panel which kind of map should I choose? If I choose Street Map and then try to search something it tells me that the search supplier needs an user name/API key. (the user name is already in the Edit/Preferences.)

OpenTopoMaf and CycleOSM - If I choose any of these maps gives me the same error. The search supplier is not configured.

Google and Here - I am going to try generate a new key or create a new project to see if I missed something. Here doesn't ask for any king of credit card payment.

ERRORS in the console
You are using this API without a key
Google Maps JavaScript API warning: NoApiKeys
Google Maps JavaScript API warning: InvalidKey
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
google.maps.event.addDomListener() is deprecated, use the standard
addEventListener() method instead

If only I could search even with the "For development purposes only" active it would be nice...
Thank you all,
JRosa


 

Mario

The selected map is independent from the search. You can search using GeoNames.org for any map type.

When you see "The search supplier is not configured", then the search provider "Search using..." in the Map Panel you have selected has no API key under Edit menu > Preferences > Geo & Maps.

This message should not show when you use "Search using GeoNames.org" and you have entered your user name for GeoNames.org under Edit > Preferences > Geo & Maps.

If you use use the "Search with HERE" option, you must put in your HERE api key. If HERE maps work in the Map Panel, the search using HERE will also work.

The error messages you see explain the problem:

You are using this API without a key
Google Maps JavaScript API warning: NoApiKeys
Google Maps JavaScript API warning: InvalidKey

You are trying to use Google Maps without a valid API key. Eiter you have not entered an API key for Google or you did not enable the APis as requried. See Google Maps API Key for a detailed explanation.

1. Enter your GeoNames.org user name in Edit > Preferences > Geo & Maps
2. Switch to the Map Panel and Select the Open Street Map map.
Does this work?

3. Use the Find command in the Map Panel and tick the "Search with GeoNames.org" option.
If your key is valid, the search will work.
Or we should see a warning in the IMatch log file after your search failed. IMatch logs warnings and error message returned by the GeoCoding services to the log file.
Use Help menu > View Log File and then search for W> to find warnings logged by IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Map Provider and Search Provider can be different. It does not matter which map you choose - you can still choose a different Search Provider in the Find dialog. So, step by step this means:
  • Choose which map to display. OpenStreetMap should work without any API key.
  • But if you want to use one of the Google maps, you have to enter a valid API key (in the Preferences > Geo & Maps dialog). If this already leads to the "for developer only" overlay, then something is wrong with your Google API key. In this case, you can not use one of the Google maps, and you also can not use Google as a search provider (which is a different option in the Find dialog of the Maps panel).
  • For all HERE maps it is the same: You will need an API key to use either the maps or the HERE based search.
  • If the API key is not valid for whatever reason, neither map display nor search (with HERE resp. Google) will work. If the API key itself is valid, you might still have to activate display and search service separately (I think).

But as OpenStreetMaps does not need any key, let's work with this one first. If you have an Geonames.org user entered in Preferences > Geo & Maps, you should be at least able to
  • display an OpenStreetMap
  • and use the Find dialog of the map panel with Geonames.org as a search provider.
2023-07-01 15_52_52-IM Test 01.imd5.jpg

Thorsten
Win 10 / 64, IMatch 2018, IMA

zematima

Thank you both.
1. Enter your GeoNames.org user name in Edit > Preferences > Geo & Maps   DONE (like in picture Geonames.jpg)
2. Switch to the Map Panel and Select the Open Street Map map. DONE
Does this work?   NO 
I choose the Open Street Map , it shows the correct location of the picture.
When I try to find something , I choose to search with Geonames.org and the message is always the same : Search supplier not found etc.
And this last part is very strange. I am going to make another account with other name and see if it works.
The errors in the console are:
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
The log file doesn't have any W only this M called my attention:M> >  0 CIMGeoLocationManager::GetLocations  'V:\develop\IMatch5\src\IMEngine\IMGeoLocation.cpp(228)'
Again thank you both.
I will give some input when I manage to get some positive result.
Enjoy your weekend.
JRosa