Currently, google maps in Digikam shows "for development purposes only" -- because the API key used is saved in the file: backend-googlemaps.html. The Google Maps API key used in this file is: AIzaSyAA7nJzEaQglnvMoOdzdmw2Y7p4ZZNHrq8 I know I can change this key to _my own_ Google API key. I did this. But I think it is preferred / easier for users to just store the user's Google API key in the Digikam settings, so that each user can easily set their own key to use with google maps. So; please make an extra field in the settings where the user can paste their own key, and use this as a variable for the URL in the backend-googlemaps.html file. (https://maps.google.com/maps/api/js?key=AIzaSyAA7nJzEaQglnvMoOdzdmw2Y7p4ZZNHrq8) If no API key is set, then use the default one (which gives the message on google maps). Maybe also add a link in the user interface to: https://developers.google.com/maps/documentation/javascript/get-api-key -- this explains how the user can get their own API key. JJ
Out of interest I ask, you pay for Google and the API key? Or have you saved a credit card as a payment method on Google? Maik
Hi Maik. I don't remember if I have added my creditcard over there, I think not. Google maps API is free, for (if I remember correctly) 2.500 lookups per day. Just log in with your google account, click on create API key, and done. Easy for all users that want to use google maps. I guess that you were thinking: "I make the application, so I need to pay google for all lookups that all users do"? .... Whoa. That would be a big invoice for you every month haha! No, just let the users that want to use google maps in Digikam enter their google maps api key. Takes 2 minutes. Yeah, ok, it's an extra step that users would have to take. But you could just link to the google documentation with the "how to". And it's a one time thing.
Hi Jonkeren, I took your advice and put my own API key in the HTML file. When I call up the HTML file directly via Firefox, a map view in Google Maps also appears. In digikam I see in all map views: nothing, just a blank (white) page. Can you currently still see a good map view? Or is it perhaps related to what Maik expressed in the following link: https://mail.kde.org/pipermail/digikam-users/2023-August/035333.html It would be a pity if Google Maps no longer worked in digikam, because that was one of the main reasons why I remained loyal to digikam over the years.
Well, we can't change anything about the current situation. Google has made changes to their servers. You could see it well on the QWebKit engine, which we still use in the Windows version, gradually less could be displayed, first thumbnails now the whole page no longer. The same with the QWebEngine, which is even based on Chromium. With QWebEngine I still have hope that there will be adjustments. There is a new controversial extension in Chrome (Web Environment Integrity (WEI)). It is possible that Google only allows certain browser engines. Google has also banned us from using embedded browsers to authorize Google Photo or Drive, they explicitly require an up-to-date desktop browser. We can't change anything at this time. @Gilles, we had a patch queued that loads Maps tiles directly, it also doesn't work anymore. You had a program (name?) on macOS that also loaded the tiles directly, is it still running? Maik
>@Gilles, we had a patch queued that loads Maps tiles directly, it also doesn't work anymore. >You had a program (name?) on macOS that also loaded the tiles directly, is it still running? The program is QGeoView available here : https://github.com/AmonRaNet/QGeoView ... and yes, i just updated the code and recompiled : https://i.imgur.com/oNj4zZ4.png Look like not only GoogleMaps is supported. BingMap is also available... The program is not specific to MacOS. I run it in my VM with Kubuntu. Gilles
Git commit 8a4718bad0d4dd1e0a310458bb54cf6f4ebe09a2 by Maik Qualmann. Committed on 25/08/2023 at 08:20. Pushed by mqualmann into branch 'master'. fix loading Google Maps with QWebEngine Related: bug 473671 FIXED-IN: 8.2.0 M +1 -1 NEWS M +1 -0 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp https://invent.kde.org/graphics/digikam/-/commit/8a4718bad0d4dd1e0a310458bb54cf6f4ebe09a2
Git commit 2255ebe5c28c47867d4930e16567b4ca80ef2f14 by Maik Qualmann. Committed on 25/08/2023 at 23:00. Pushed by mqualmann into branch 'master'. add the ability to enter a Google Maps API Key FIXED-IN: 8.2.0 M +1 -1 NEWS M +113 -0 core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp M +2 -1 core/utilities/geolocation/geoiface/backends/backendgooglemaps.h https://invent.kde.org/graphics/digikam/-/commit/2255ebe5c28c47867d4930e16567b4ca80ef2f14
All 8.2.0 bundles are now recompiled and available here : https://files.kde.org/digikam/ Please test if the new Google API key support work as expected. Thanks in advance Gilles Caulier
Git commit 03fe6c7040c0418b9f0cc7548719c46711a494e3 by Maik Qualmann. Committed on 26/08/2023 at 14:37. Pushed by mqualmann into branch 'master'. show javascript message if no billing is enabled M +17 -0 core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp M +1 -0 core/utilities/geolocation/geoiface/backends/backendgooglemaps.h M +18 -3 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp M +3 -0 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.h https://invent.kde.org/graphics/digikam/-/commit/03fe6c7040c0418b9f0cc7548719c46711a494e3
Hello all, First of all, I would like to thank Maik and Gilles very much for searching intensively and quickly for a solution to this problem. I have now installed the new version 8.2 from today. Unfortunately, the window always remains empty in all three map views if I use google maps. Even after I entered my own API key, there was no change even after restarting digikam. However, the individual key remains. Where is it actually stored? The default key is still entered in the file "backend-googlemaps.html".
You are using the Windows bundle we created. This uses QWebKit and can no longer display Google Maps javascript API, there will be no solution for that either. The fix currently affects Linux with QWebEngine, Linux AppImage, macOS and a Windows bundle with QWebEngine. There is a digkam build on the KDE Servers for Windows that uses QWebEngine and is compiled with the Microsoft compiler. However with restrictions, no MySQL and HEIF or JPEG2000 support. I've started a recompile, let's see if it builds. https://binary-factory.kde.org/view/Windows%2064-bit/job/Digikam_Nightly_win64/ Of course, the API key remains in the original file, after all it is in a read-only area. On Windows, the "backend-googlemaps.html" copy is located at "C:\Users\%USERNAME%\AppData\Local\digikam\geoiface\" If you enter an empty API key, this copy will be removed again. The build failed, just look over the next few days to see if a build greater than 1492 was successful. Maik
I added a message window in git/master that shows the Goggle message if the API key doesn't work due to a missing billing account. I tried to create a private API key with Google myself, but it doesn't work without setting up a billing account. Google only grants the free monthly credit with a billing option. Maik
I tried the same here today without success. You need to pay now for a simple Google usage. Gilles
Git commit d6612be197277a2fdb8dcbed946ec692f65f77cb by Maik Qualmann. Committed on 26/08/2023 at 18:35. Pushed by mqualmann into branch 'master'. try settings for QWebView to load Google Maps M +6 -0 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebkit.cpp https://invent.kde.org/graphics/digikam/-/commit/d6612be197277a2fdb8dcbed946ec692f65f77cb
Gilles, I can't test QWebView anymore, can you push a windows build? Maik
Hi Maik, I will Build the Windows bundle this morning
QWebView is not QtWebkit. https://doc.qt.io/qt-5/qtwebview-index.html Did you try to replace QtWebkit usage under Windows with the native browser wrapper from Qt ? Gilles
Maik, windows installer is just uploaded Gilles
Unfortunately no change, nothing is displayed anymore. Gilles, I'm a little confused now. QWebView, which we still use on Windows, is the libQtWebKit. If I understand correctly, is there a QML class QWebView in Qt5 that uses the native browser of the system? Do you mean that as native Qt browser? Maik
QWebView is not QWebKit at all. QWebWiew host a native browser in a QtWidget. this do not implement a web browser as QWebkit or QWebEngine. QWebWiew is a QML part. The goal is to able to render a web page with the native html engine without to use a dedicated code. This is necessary for some platforms as ios where Apple deny to install and use a different web browser than Safari. and yes, Chrome and Firefox under IOS are just a container for Safari. QWebView already exists in Qt 6 as you can see here : https://doc.qt.io/qt-6/qtwebview-index.html ... but as you can read, QWebView under Windows use QWebEngine... So, it's not the right solution... Gilles