Bug 433732

Summary: Google Maps labelled "For development purposes only"
Product: digikam Reporter: Kurpfaelzer <Stephan.Kranz>
Component: Geolocation-GoogleMapsAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: normal CC: caulier.gilles, claude.troietto, erik.krause, info, lubehoer, metzpinguin, pip.kde, stuart.hill, Thomas.bach
Priority: NOR    
Version: 7.2.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Kurpfaelzer 2021-02-28 07:43:23 UTC
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
Comment 1 Kurpfaelzer 2021-02-28 08:13:31 UTC
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"
Comment 2 Maik Qualmann 2021-02-28 08:34:28 UTC
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
Comment 3 Kurpfaelzer 2021-02-28 09:07:23 UTC
Thank you for your clarification!
Stephan
Comment 4 Maik Qualmann 2021-02-28 17:15:57 UTC
*** Bug 433746 has been marked as a duplicate of this bug. ***
Comment 5 Kurpfaelzer 2021-03-02 06:14:09 UTC
(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
Comment 6 Maik Qualmann 2021-03-02 06:47:52 UTC
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
Comment 7 Paul 2021-03-03 11:15:54 UTC
So... Could you please clarify what this will mean for the future use of Google Maps with digikam?

Regards, Paul
Comment 8 info 2021-03-03 11:47:02 UTC
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)
Comment 9 Maik Qualmann 2021-03-03 12:20:50 UTC
(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
Comment 10 info 2021-03-03 14:37:25 UTC
(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.
Comment 11 info 2021-03-03 15:00:28 UTC
May be the Bing map can be used in non profit mode

https://www.microsoft.com/en-us/maps/licensing/licensing-options
Comment 12 caulier.gilles 2021-03-30 06:48:05 UTC
*** Bug 435137 has been marked as a duplicate of this bug. ***
Comment 13 Maik Qualmann 2021-08-01 15:41:46 UTC
*** Bug 440503 has been marked as a duplicate of this bug. ***
Comment 14 caulier.gilles 2021-08-26 13:08:25 UTC
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
Comment 15 Maik Qualmann 2021-08-27 15:42:35 UTC
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
Comment 16 caulier.gilles 2021-08-27 16:54:42 UTC
yes, i see also this kind of deal with Google API.

Did you look the Bing Map backend too ?

Gilles
Comment 17 Maik Qualmann 2021-08-27 19:45:23 UTC
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
Comment 18 caulier.gilles 2021-08-27 20:19:15 UTC
yes agree, this can be a project for next GSoC

Gilles
Comment 19 Maik Qualmann 2021-09-07 14:40:00 UTC
*** Bug 442130 has been marked as a duplicate of this bug. ***
Comment 20 caulier.gilles 2021-12-30 05:19:22 UTC
*** Bug 447677 has been marked as a duplicate of this bug. ***
Comment 21 caulier.gilles 2022-01-01 11:09:38 UTC
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
Comment 22 Maik Qualmann 2022-01-01 12:37:17 UTC
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
Comment 23 caulier.gilles 2022-01-01 12:57:41 UTC
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
Comment 24 caulier.gilles 2022-01-01 13:08:33 UTC
Issue created in github :

https://github.com/subsurface/subsurface/issues/3367

We will seen...

Gilles
Comment 25 caulier.gilles 2022-01-05 21:09:43 UTC
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
Comment 26 caulier.gilles 2022-01-15 14:58:32 UTC
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
Comment 27 Maik Qualmann 2022-01-15 21:38:28 UTC
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
Comment 28 Erik Krause 2022-06-19 13:56:06 UTC
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...
Comment 29 Maik Qualmann 2022-06-19 14:10:05 UTC
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
Comment 30 Erik Krause 2022-06-19 14:32:44 UTC
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
Comment 31 Maik Qualmann 2022-06-19 17:40:02 UTC
As a workaround you can edit the following HTML file:

/usr/share/digikam/geoiface/backend-googlemaps.html

Adjust the path accordingly for Windows.

Maik
Comment 32 Erik Krause 2022-06-19 21:00:34 UTC
Works. Many thanks!

For windows the path is <program files>\digiKam\data\digikam\geoiface\backend-googlemaps.html

Erik