Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Google Maps API #48

Closed
8 tasks done
kghbln opened this issue May 4, 2018 · 6 comments
Closed
8 tasks done

Set up Google Maps API #48

kghbln opened this issue May 4, 2018 · 6 comments
Assignees
Labels
enhancement server - phalaris phalaris (03) server - stetsonia stetsonia (9901) site - s-mw.org - sandbox sandbox.semantic-mediawiki.org (99071) site - s-mw.org - www www.semantic-mediawiki.org (99072)

Comments

@kghbln
Copy link
Member

kghbln commented May 4, 2018

Starting June 11, 2018 every site needs an Google Maps API key. At the same time it starts be be a paid service for everyone with a 200 USD credit for free calls every month.

Applicable for "s-mw.o" are dynamic maps with up to 28,000 loads. So we will go with that. I the limit of 28,000 is reached no Google maps will be served on the wiki.

Finding the console for API-keys is horrible. This is the quick link.

Docu I found along the way:

s-mw.o

  • Obtain Google Maps API key
  • Add the key to configuration
  • Switch to "leaflet" as default mapping service in configuration
  • Add a note to all pages providing Google Maps docu referencing this issue

The API may only be used from https://www.semantic-mediawiki.org or https://semantic-mediawiki.org. Moreover only the "Geocoding API" and the "Maps JavaScript API" may be used.

sb.s-mw.o

  • Obtain Google Maps API key
  • Add the key to configuration
  • Switch to "leaflet" as default mapping service in configuration
  • Add a note to all pages providing Google Maps docu referencing this issue

The API may only be used from https://sandbox.semantic-mediawiki.org. Moreover only the "Geocoding API" and the "Maps JavaScript API" may be used.

Note: In April 2018 sb.s-mw.o had 687 calls to the "Geocoding API" and 10 calls to the "Maps JavaScript API". No other specialized APIs were called.

@kghbln kghbln added enhancement site - s-mw.org - sandbox sandbox.semantic-mediawiki.org (99071) site - s-mw.org - www www.semantic-mediawiki.org (99072) server - phalaris phalaris (03) server - stetsonia stetsonia (9901) labels May 4, 2018
@kghbln kghbln self-assigned this May 4, 2018
@kghbln
Copy link
Member Author

kghbln commented May 5, 2018

Can I still use Google Maps Platform for free?

Yes. Starting June 11, 2018, when you enable billing, you get $200 free usage every month for Maps, Routes, or Places. Based on the millions of users using our APIs today, most of them can continue to use Google Maps Platform for free with this credit.

Is a credit card or billing account required?

Even though your first $200 of monthly usage is free, all Google Cloud Platform services require a credit card and billing account, to cover any amount you spend over this free credit. If you are billed, we'll credit your account for the first $200 of monthly usage. If you choose not to add a billing account, there is a risk that if your usage exceeds $200 in a given month, your Maps API implementation will be degraded or other API requests will return an error. If your estimated usage will be above $200 a month and you don't have a credit or debit card to set up a billing account, a local Google Maps Partner may be able to help.


Obviously Google is not clear if a billing account has to be added or not. So do I have to add a billing account after all or do I just get errors if I do not add a billing account and the limit is reached?

@kghbln
Copy link
Member Author

kghbln commented May 5, 2018

  • June 5, 2018 I will be revisiting this and have a peep at the API usage of the past month. This will help getting a feeling for the number of calls made.
  • June 11, 2018 I will be revisiting this and check if the maps render even though no billing information was provided.

@kghbln
Copy link
Member Author

kghbln commented May 18, 2018

Since I have observed that geocoding is completely broken on sm.o I now spent another two hours on top of the two hours I already spend on trying to get it working. What I have additionally done now:

  • I have added an billling account.
  • I have veryfied the domains for the billing account.
  • I have enabled push notifications for the Maps API involving s-mw.o and sb.s-mw.o

As a result still 100% of all geocoding requests are answered with code 403. Regrettably Google does not specifiy why it answers all requests with error code 403. All examples that involve geocoding continue to be broken on both websites for all maps services since they all rely on googlemaps geocoding.

To sum up: I am sickened, saddened and worst of all utterly fatigued.

@JeroenDeDauw
Copy link
Member

I'll have a look myself if perhaps the API maps uses no longer exists or something. But as mentioned on the linked issue, you do not have to use the Google service.

@kghbln
Copy link
Member Author

kghbln commented May 18, 2018

Thanks a lot for the pointer to the alternative geocoding providers. I have now switched to 'nominatim' which provides better results than 'geonames' and deleted the "Geocoding API" from the Google Maps keys. Thus we are only using the "Maps JavaScript API" which is working.

Note: I have nothing against someone how provides a service and wants to get money for it - au contraire. I however dislike that I spent about four hours trying to get it working and digging through contradictory information, supposedly doing everything what they want and in return be informed that all of the 8500 API calls errored out with an undocumented error code. I am done with Google geocoding as far as I am concerned.

@kghbln
Copy link
Member Author

kghbln commented Jun 3, 2018

"Maps JavaScript API" from 2018-05-03 to 2018-06-03

  • www = 1193 calls
  • sandbox = 19 calls

@kghbln kghbln closed this as completed Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement server - phalaris phalaris (03) server - stetsonia stetsonia (9901) site - s-mw.org - sandbox sandbox.semantic-mediawiki.org (99071) site - s-mw.org - www www.semantic-mediawiki.org (99072)
Projects
None yet
Development

No branches or pull requests

2 participants