Location doesn't stay in place

Started by busbahnhof, November 15, 2019, 02:22:36 PM

Previous topic - Next topic

busbahnhof

I tried to define my first location. I did it according to the help. When moving the map the location circle stayed on the same place on the screen. No matter where I moved the map to. Also no difference if lock symbol activated or not.

I am using Google API.

What am I doing wrong?

Best regards,
Chris

P.S.: Had to rewrite my mail after Forum told me that the three pictures were too large. A bit annoying ;-)

Mario

Your Google Maps key is invalid. Google is hence delivering only static images and much of the map API may not work correctly.
This is why your map tells you everywhere "For development purposes" only.

Either enter a Google Maps API key or switch to a map provider for which you have an API key.

See: https://www.photools.com/imatch/api-keys-explained/

Then retry.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Strange.. I am seeing the same "Development purposes only" overlay today... and I have the same API key set from October that I usually do... switch to HERE to process my photos which works wonderfully (of course) but switching back to Google shows the same issue...  API key is set with proper restrictions and quota not exceeded... thoughts?

Mario

No problems here on two machines.

Do you see any problem messages in the Google console? Something expired?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on November 20, 2019, 01:31:42 PM
No problems here on two machines.

Do you see any problem messages in the Google console? Something expired?

Nope... all looks good in the console.. This is what I'm seeing in IMatch....



I'll try creating yet another google API key and see if that does the trick...

Jingo

New API key fixed the problem.... I so do not like Google's handling of API's, keys and maps! 

Sorry to bother you with this....

Jingo

Restart Imatch and poof... it's not working again.  Sadness....  going to try my other google account and see if that sticks...

Mario

If Google reports an error or some other messages they are included in the IMatch log file.
Search for lines containing W> or E>.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

#8
No Warnings or Errors in the log.. but I figured it out.

I ran the MAP app in the browser via: http://127.0.0.1:50519/imatch/apps/mapapp/index.html (for future searching) and turned on the developer tools... saw that the API key I switched to was only for Cloud AI... not Maps API.  Once I enabled that API and added the restriction to the key, the app loaded without issue.

All set now.... Thx!


PS: Just thinking out loud here... any thought to adding javascript responses for non-app managed apps into the output panel within Imatch?  With more and more function moving towards APPs, being able to see these in the output panel (or a dedicated JS panel) might help the less tech savvy... or - perhaps adding a "run in browser" function to the settings drop down for these type of apps?

Mario

What's a non-app managed app ???

Console output from apps is logged to the IMatch output panel (Apps tab) automatically.
If you run an app in a browser, console output goes into the browser console.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Quote from: Jingo on November 20, 2019, 01:54:48 PM
New API key fixed the problem.... I so do not like Google's handling of API's, keys and maps! 

Feel free to complain with Google.
Or use OpenStreetMaps, Bing Maps or HERE maps. IMatch gives you a lot of choices and does not force you to use Google.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on November 20, 2019, 04:13:02 PM
What's a non-app managed app ???

Console output from apps is logged to the IMatch output panel (Apps tab) automatically.
If you run an app in a browser, console output goes into the browser console.

A non-app managed app is what I consider any function in IMatch that is an APP but is not in the APP Manager... Map for example or the LR Importer.  These apps don't have an easy "run in browser" command like all the other app panel apps do but are still "apps" that use JS and Chromium to run.

The IMatch output panel only shows things directed to it via the Console.log... while the developer tools in firefox/chrome shows true JS and syntax errors (such as the invalid API error which was simple to diagnose once I ran the map panel in the browser)... having an option to run these apps in the browser is quite helpful to diagnose issues like this.

Just thinking out loud.... I know 99% of users will never need this :)

Mario

The JS errors are available inside the developer tools in your browser. Not in the browser itself.
Not sure what you expect. When I add an error to the VarToy app running in the app panel (calling a function that does not exist), the App output panel in IMatch shows:

WARN:jQuery.Deferred exception: doesNotExist is not defined
WARN:ReferenceError: doesNotExist is not defined
    at HTMLDocument.<anonymous> (http://127.0.0.1:50519/imatch/apps/vartoy/app.js:16:5)
    at e (http://127.0.0.1:50519/system/jquery/dist/jquery.min.js:2:29453)
    at t (http://127.0.0.1:50519/system/jquery/dist/jquery.min.js:2:29755)
WARN:undefined


I get about the same info in the Chrome/Mozilla console.
The debugger (part of the developer tools) is also able to catch the exception and produce a stack trace. That's beyond what I want to implement in IMatch.

Also, when I deliberately mess up my Google Maps Api Key in IMatch and try to work with the Map Panel, the App output panel in IMatch shows:

WARN:Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key

I'm sure Google is dumping a similar message when you try to use a key which is not enabled for map API use.

I find this quite sufficient for the IMatch context. To actually debug apps, the debugger in an external browser is better (starting with available screen estate).

Note: You can also debug apps running in IMatch by connecting to them from Chrome using the debug port provided by IMatch.
In that case you can monitor and debug the live Map Panel, Import & Export apps, service apps etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

busbahnhof

Back from holiday and I did another test.

Nothing changed since the last try. And now the location circle stays where it should be.

But the map was still showing the lables "For development purpose only". Don't know if this affects anything, but at least it looks weird. Changed to a new key without any restrictions  limitations. Still the same.

Anyone with the same experience?

Best regards,
Chris

Mario

Make sure you have enabled the required services/APIs for your key or Google will not allow IMatch to access real map data.
See https://www.photools.com/imatch/api-keys-explained/
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

busbahnhof

Just looked at the log file. Maybe this issue has to do something with Google wanting to see my credit card information.

So this will not happen and will switch over to bing maps. Consider this topic to be solved.

jch2103

Quote from: busbahnhof on December 03, 2019, 09:11:54 PM
Just looked at the log file. Maybe this issue has to do something with Google wanting to see my credit card information.

So this will not happen and will switch over to bing maps. Consider this topic to be solved.

Yep, Google wants to make sure it will be paid in case a user goes over the fairly generous free initial useage. So far, I haven't crossed that threshold. (And they already have my credit card number from other purchases.)
John

Mario

#17
Of course Google wants your card. They switched to card-only almost a year ago. All other accounts are now invalid.
You should have received several emails to your registered email account and also messages in the dashboard.

It is the same for Bing and HERE.

All vendors require a proper credit card, even when they will never charge you (unless you exceed your generous free monthly quota).
They want to protect their services from abuse and also need a proper authentication. Which is understandable.
They all offered their services for free for years. Now that users rely on them, they want to see some return on investment.

The only free service currently is OpenStreetMap. But they have usage limits and will stop working when you exceed them.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook