SUMMARY Yesterday, I realized, that all types of Google Maps are labeld with "For development purposes only". How can this be avoided? Is there any workaround? STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
In the meantime, I found following discussion: https://mail.kde.org/pipermail/digikam-users/2021-February/031925.html "Hi all this morning I wanted to modify the geolocalisation of my latest pictures , and when I opened the tools I got the error message : "this page didn’t load google maps correctly" and the map is displaied with the watermark "for development purpose only" when I look at the solutions, seems we have to regenerate some API key , but not sure if it is applicable to this case I'm using 7.2RC (I'm not sure I already used the geolocalisation with this version since I installed it, but I was using it regurlaly with previous versions) thanks for any suggestion to fix it. frederic"
For the use of the Google Maps Java Script API, Google provides a project with free access worth $ 200 free of charge. This corresponds to 28,000 dynamic Google Maps views per month. We exceeded that limit this month. From March 1st, the Google Maps map will work again. We have already taken steps to reduce unnecessary Google Maps calls. In the future, the maps in the digiKam sidebar will always start with the Marble maps. Google Maps must be selected in the sidebar every time it is started, if required. We don't have any other option than an open source project, a larger volume would have to be bought from Google every month. Maik
Thank you for your clarification! Stephan
*** Bug 433746 has been marked as a duplicate of this bug. ***
(In reply to Maik Qualmann from comment #2) > From March 1st, the Google Maps map will work again. > > Maik Is there another issue with Google Maps or why does the label still appear? Stephan
Yes, our access to Google Maps already existed before 2018, until then it was not necessary to store a payment option. Google requires that a payment option is stored, credit card, PayPal or the like, even if there are no monthly payments. Without a valid payment option, access to Google Maps will be prevented. Maik
So... Could you please clarify what this will mean for the future use of Google Maps with digikam? Regards, Paul
May be, as Jeffrey’s “Geoencoding Support” Plugin for Lightroom, it might be required to add the ability for the user to add his own google key for the use of the map. The generic use of the developer key for all users will bring this "max requests used" issue up very soon as the user base grows. Stetting the default to open street map / Marble globe is a good idea and one step to reduce the request towards google. But it might not be the ultimate solution. My default is Open Street Map, but for finding the right location I often need the birds view from the top. I do not know if other services can offer similar things (sattelite view). (http://regex.info/blog/lightroom-goodies/gps#viewat)
(In reply to info from comment #8) > May be, as Jeffrey’s “Geoencoding Support” Plugin for Lightroom, it might be > required to add the ability for the user to add his own google key for the > use of the map. Indeed? Can you enter your own key in the program? We have already thought about it. But I can't imagine that Google would find that okay. Otherwise, don't get impatient, we're working hard to add a billing account. If anyone has experience adding and verifying a PayPal billing account, please contact us. For the future, we will have to set a daily limit and Google Maps will probably not always be available on a daily basis. Maik
(In reply to Maik Qualmann from comment #9) > Indeed? Can you enter your own key in the program? We have already thought > about it. But I can't imagine that Google would find that okay. Yes it is possible as he had the same issue with too many access requests. And I do not think google can do something about it.
May be the Bing map can be used in non profit mode https://www.microsoft.com/en-us/maps/licensing/licensing-options
*** Bug 435137 has been marked as a duplicate of this bug. ***
*** Bug 440503 has been marked as a duplicate of this bug. ***
Maik, Just take a look to this project from Github : https://github.com/AmonRaNet/QGeoView There is a demo where you can add layer on map view (Backgroup Maps), including... GoogleMap and Bing. And it work as well... Interesting no ? Gilles
Hmm, an interesting solution. After a quick look, I see that the tiles are loaded directly past the Google API, the user agent string is changed, etc. I cannot imagine that Google would agree to this. Maik
yes, i see also this kind of deal with Google API. Did you look the Bing Map backend too ? Gilles
The same goes for the Bing backend. I actually plan to start with Bing, but the way via the official API. Maybe it would be something for GSoC-2022 as well. Bing has a pricing model for non-profit organizations. Maik
yes agree, this can be a project for next GSoC Gilles
*** Bug 442130 has been marked as a duplicate of this bug. ***
*** Bug 447677 has been marked as a duplicate of this bug. ***
Hi Maik and happy new year for you and your familly. Look my screen shot from MacOS and Subsurface Qt application: https://i.imgur.com/PuqnhYS.png It uses a special QtPosition plugin to support google maps very well. Where is the magic here ? bash-3.2$ pwd /Applications/Subsurface.app/Contents/PlugIns/geoservices bash-3.2$ ls -al total 15944 drwxr-xr-x@ 9 gilles admin 288 19 nov 18:32 . drwxr-xr-x@ 12 gilles admin 384 19 nov 18:32 .. -rwxr-xr-x@ 1 gilles admin 239968 19 nov 18:32 libqtgeoservices_esri.dylib -rwxr-xr-x@ 1 gilles admin 306000 19 nov 18:32 libqtgeoservices_googlemaps.dylib <= !!!!!!!!!! -rwxr-xr-x@ 1 gilles admin 75472 19 nov 18:32 libqtgeoservices_itemsoverlay.dylib -rwxr-xr-x@ 1 gilles admin 464976 19 nov 18:32 libqtgeoservices_mapbox.dylib -rwxr-xr-x@ 1 gilles admin 6269856 19 nov 18:32 libqtgeoservices_mapboxgl.dylib -rwxr-xr-x@ 1 gilles admin 467552 19 nov 18:32 libqtgeoservices_nokia.dylib -rwxr-xr-x@ 1 gilles admin 325232 19 nov 18:32 libqtgeoservices_osm.dylib Codes : https://github.com/subsurface Gilles
QtPositioning offers access to mapbox, osm etc. The Google Maps plugin comes from here: https://github.com/subsurface/googlemaps After a quick look, I see that it loads tiles directly from the Google server, bypassing the API. This is a violation of Google's Terms of Service: https://developers.google.com/maps/faq#tos_tiles I don't know if we should do it, I don't think so. Maik
So, it's the same mechanism than https://github.com/AmonRaNet/QGeoView ... Perhaps we can post a message in github Subsurface issue section about this problem to see what's the team will respond... Gilles
Issue created in github : https://github.com/subsurface/subsurface/issues/3367 We will seen... Gilles
Maik, We have receive a response from Subsurface team : https://github.com/subsurface/subsurface/issues/3367#issuecomment-1006003655 As you take a closed look in source code using GoogleMaps in Subsurface, please ask more questions for the details. Gilles
Maik, Following the response of subsurface team, which have a similar use of GoogleMaps than digiKam, it sound like Google don't care about the open source use of direct data access. So, i think it safe to use the same way than Subsurface to render the googlemaps view in digiKam... Gilles
Hmm, I'm sure it's not desired by Google. However, we must be able to display markers and images on the map. Also we need to be able to show tracks. We also need to be able to get the current position on the map. All this is only possible with the java script API... Maik
As a workaround, there should be a possibility for anyone who wants to use Google Maps to supply their own maps API key. This way, anyone will be below the limit...
Are you willing to provide your credit card, if you have one, to Google? Because if you exceed the monthly limit, your credit card will be debited. Maik
Of course anyone should know about that possibility. However, I doubt a single person will exceed 28,000 map loads a month with just geotagging their images. And you can set a quota limit to avoid unwanted costs. But I concur that in the long run another API should be used, f.e. leaflet.js
As a workaround you can edit the following HTML file: /usr/share/digikam/geoiface/backend-googlemaps.html Adjust the path accordingly for Windows. Maik
Works. Many thanks! For windows the path is <program files>\digiKam\data\digikam\geoiface\backend-googlemaps.html Erik
Hi Maik, I found a hack to drop the "For development only" frame from googlemaps : https://gist.github.com/amirhp-com/1f30132afbb54970930690d06dc9a764 So it's typically doable at least in DK GoogleMaps backend i think Gilles
That's a really interesting idea. Maik
In fact, if you test to show GoogleMaps view on a slow network, you will see that the map appears first, and later, a frame is superposed with the fingerprints. I think the idea of this JS code is to reroute the frame in the trash. Gilles
The function also requires the jQuery Javascript library. With the setInterval() function, the googlemap_remap() function is called every 10ms. The idea here is to hide the normal view and then load the requested tiles. After intensive debugging, I'm sure that it no longer fits the current Google Maps API. Maik
Ok, I'm a little further. It now works inside digiKam. It's a bit slower than the normal map view and when zooming you may sometimes see the map with the developer label. The main problem is, it only works with the street map. Maik
It still happens on 7.8.0. The map is usable but the label "For development only" and an alert are shown over the map
Maik, perhaps we can patch DK code at least for the street map. It's better than nothing... Gilles
ok I can do. Although the lettering above the map disappears, the message that slides in from above remains the first time. But it can be clicked away. Maik
Just a short question: What is the difference between Geosetter and Digikam when using google.maps? In the new beta of Geosetter you can use google.maps without the rather annoying note "for development purposes only". Would there be a possible solution? Stephan
New geosetter now uses leaflet instead of google api. It loads google tiles though: https://gis.stackexchange.com/questions/225098/using-google-maps-static-tiles-with-leaflet
@Erik: thank you for the explanatory note. I am not familiar with the topic now and therefore cannot classify it. But would that possibly be a way for Digikam?
We have already discussed this method internally. This loads the tiles directly from the Google server. When I look at Google's terms of service and interpret them, this is not allowed by Google. I don't know how far Google would go to defend their terms and conditions in the future. In addition, there are many things we can't do without the JavaScript API. I will look at the map display in Geosetter. But I find it interesting that Geosetter is not willing to deposit a payment account with Google either. But they probably won't be able to get by with the 28,000 queries per month either. Maik
One more note, we agreed to provide our PayPal account, but Google rejected the PayPal account. Google has recently removed the PayPal payment option. Maik
(In reply to Maik Qualmann from comment #45) > One more note, we agreed to provide our PayPal account, but Google rejected > the PayPal account. Google has recently removed the PayPal payment option. > > Maik Can't we have a setting where a user can have their own API key? I would not have any problem with using my own API account for google maps.
As of 7/9/2023 Satellite view doesn't work anymore (request limit reached?) Is there another "free" satelliet map provider (I don't know, Bing or somesuch) that could be implemented? In the long term, I think one good solution (good for the final user, maybe hard to implement) is to allow the user to load OziExplorer .map files, or somesuch.
Loading Google Maps works again with the latest digiKam-8.2.0 packages for Linux and macOS. Windows is currently no longer possible. In digiKam-8.2.0 it is also possible to set your own API key if you have one. https://files.kde.org/digikam/ Maik
(In reply to Maik Qualmann from comment #48) > Loading Google Maps works again with the latest digiKam-8.2.0 packages for Linux and macOS. Windows is currently no longer possible. Why is loading Google Maps only in Windows not possible anymore?
>Why is loading Google Maps only in Windows not possible anymore? Because Official Windows installer is fully cross compiled under Linux and QtWebKit is used inside. This one is not supported anymore as web client by Google. QtWebEngine must be used instead, but this huge component do not cross compile. A Windows computer must be used to build the installer. Look on the binary factory from KDE project, this kind of installer is available, but it has severals limitation as the non support of HEIF and Mysql. https://binary-factory.kde.org/view/Windows%2064-bit/job/Digikam_Nightly_win64/ Best regards Gilles Caulier
Como acessar o google maps no digikam 8.1.0 pois não consigo visualisar as ruas ou por satélite
I currently face the issue that Google Maps imagery (all types no matter if satellite or road map) is not updated when moving the map in the geolocation editor. The edges of the image remains white. It loads the map once when opening the editor and that's it. If I move the window, open and close it again, it loads the imaginary at the place where I left the last time. As a workaround one could use Marble to open a specific location, go to Google Maps open and close the editor, but that's very annoying. This applies to the appimage of digikam 8.1.0 as the native Arch Linux crashes because of bug #477379.
The problem that the map cannot be moved is fixed in digiKam-8.2.0. Maik
Hi all , With 8.2.0, digiKam is not cross compiled anymore. The build is native under Windows 10 and Google maps must work fine under Windows with this release. Maik, If the user enter the Google API key in the Map settings, the "For development purposes only" message will be removed ? Gilles
(In reply to caulier.gilles from comment #54) > Hi all , > > With 8.2.0, digiKam is not cross compiled anymore. The build is native under > Windows 10 and Google maps must work fine under Windows with this release. > > Maik, > > If the user enter the Google API key in the Map settings, the "For > development purposes only" message will be removed ? > > Gilles Hi Gilles, although I use my own API key, google.maps is unfortunately still displayed with the message "For development purposes only". I have also noticed that the markers for positions are no longer displayed. However, the thumbnails are working. Stephan
That's a good question, you would have to have a valid paid API key. You can create one on Google and enter it, but if there is no billing account stored, digiKam will display the Java script error message because of the missing billing account. So if a user is already using their own API key, feedback would be very welcome. @Kurpfaelzer, Have you also set up a billing account? The API key that you could create 2 years ago is now not valid without a payment option. @Gilles, I don't have a Windows version available at the moment. Is it possible that the marker icons are still missing in the Windows version? Maik
(In reply to Maik Qualmann from comment #56) > @Kurpfaelzer, Have you also set up a billing account? The API key that you > could create 2 years ago is now not valid without a payment option. > Maik Hi Maik, I've set up a billing accout. My API key was created in August this year. Stephan
Git commit 475aecd1d09bd9664fc2170962f91be8464390cc by Maik Qualmann. Committed on 03/12/2023 at 07:28. Pushed by mqualmann into branch 'master'. add debug output for the JavaScript messages M +2 -0 core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp https://invent.kde.org/graphics/digikam/-/commit/475aecd1d09bd9664fc2170962f91be8464390cc
With one of the next test versions you can use DebugView to see why the key is probably not accepted. Alternatively, you could provide me with your key for testing purposes. You could generate a new key at any time later. Maik
(In reply to Maik Qualmann from comment #59) > With one of the next test versions you can use DebugView to see why the key > is probably not accepted. > Alternatively, you could provide me with your key for testing purposes. You > could generate a new key at any time later. > > Maik It was my mistake! Sorry for that. I had probably used an expired test account. So I created a new project with a corresponding billing account and then generated a new API key. Now at least the message "For development purposes only" is no longer visible. However, what doesn't quite work yet is the display of the image position with the markers. Only the thumbnail display works. If I use Marble, the markers are visible. Have an nice day, Stephan
Hi Kurpfaelzer, This is a great advance in this file. Great... For your test about the pending image position problem over GoogleMaps, i recommend to use the 8.3.0 pre-release installer available here : https://files.kde.org/digikam/ I just updated this morning. Best Gilles Caulier
(In reply to caulier.gilles from comment #61) > Hi Kurpfaelzer, > > This is a great advance in this file. Great... > > For your test about the pending image position problem over GoogleMaps, i > recommend to use the 8.3.0 pre-release installer available here : > > https://files.kde.org/digikam/ > > I just updated this morning. > > Best > > Gilles Caulier Hi Gilles, thank you for your link. I had just installed the version "digiKam-8.3.0-20231203T095303-Win64". The markers are still not visible. But nevertheless, I am absolutely happy that GoogleMaps is working again. Many thanks for that. Greetings, Stephan
I have no problems with the markers in the Windows version, they are displayed. Maik
(In reply to Maik Qualmann from comment #63) > I have no problems with the markers in the Windows version, they are > displayed. > > Maik Are there any settings that can be used to influence the behaviour?
No, there is no setting for this. I suspect it has something to do with the graphics acceleration of the QWebEngine. I also have a desktop computer with Windows 10 and an older Intel graphics card that doesn't display Google Maps. We'll see if we can tune QWebEngine here. My Windows 10 laptop with a Radeon graphics card shows markers. Maik
(In reply to Maik Qualmann from comment #65) > No, there is no setting for this. I suspect it has something to do with the > graphics acceleration of the QWebEngine. I also have a desktop computer with > Windows 10 and an older Intel graphics card that doesn't display Google > Maps. We'll see if we can tune QWebEngine here. > > My Windows 10 laptop with a Radeon graphics card shows markers. > > Maik You're right. If I leave the entry field of the API-key empty, then all markes are shown as expected. But if I use my own API-key, I can only see the thumbnails. Funny, isn't it? Stephan
Maik, What's news here ? Since we support Google API key the "development purpose only" problem is fixed, but why we can only see the thumbnails over the maps as explained in comment #66 ? It's a problem with QtWebEngine ? We need a more recent version from Qt5/6 ? Gilles
Hi Maik, My recent commit move the GoogleMaps API key to the new Setup Geolocation page. We have now a GeolocationSettings singleton + container to host settings and forward changes to all geolocation views. The Geolocation combobox menu Settings action open also the setup page accordingly. Please review and test if nothing is broken. Thanks in advance Gilles
It crashes when the API key is deleted and when closing the setup. Maik
Oups i don't check this case. Yes it's reproducible here... in QtWebEngine. It's a race condition when all html view are reloaded ? Do we needs to use QTimer signal in place ? Gilles
In reload() d->htmlWidget can still be a nullptr. But there seems to be another problem. Maik
Git commit ffe7a3af00e452c245ef07ae2f1f8a55aaa9d29c by Maik Qualmann. Committed on 26/12/2023 at 18:14. Pushed by mqualmann into branch 'master'. fix crash und reload if Google Maps key changed M +5 -2 core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp M +0 -1 core/utilities/geolocation/geoiface/core/geolocationsettings.cpp M +1 -0 core/utilities/setup/setupgeolocation.cpp https://invent.kde.org/graphics/digikam/-/commit/ffe7a3af00e452c245ef07ae2f1f8a55aaa9d29c
Git commit 0679997e80e78480c519afde71bc8103f090dbc8 by Maik Qualmann. Committed on 30/12/2023 at 18:32. Pushed by mqualmann into branch 'master'. fix display marker pixmaps with Google maps API key M +5 -3 core/utilities/setup/setupgeolocation.cpp https://invent.kde.org/graphics/digikam/-/commit/0679997e80e78480c519afde71bc8103f090dbc8
If a build with this commit is available, you will need to recreate the temporary Google Maps HTML file. This can be achieved when the key is changed, i.e. remove the keyt, apply setup and set the key again. Markers are then displayed again. Maik
(In reply to Maik Qualmann from comment #74) > If a build with this commit is available, you will need to recreate the > temporary Google Maps HTML file. This can be achieved when the key is > changed, i.e. remove the keyt, apply setup and set the key again. Markers > are then displayed again. > > Maik Firstly, I would like to wish you all a happy new year. With the current version of digikam (8.3.0 pre-release - 31.12.23) the marker view in GoogleMaps with the own API key works again. @Maik, Gilles: thank you very much for your tireless work on this! Stephan
Thanks for the feedback. I close this file now and all duplicates. Gilles Caulier