I'm using geofield and geocoder (and will soon switch to addressfield) on a site behind a VPN, which means that they had to purchase a Google business account to stay within their terms of use. But now I need to specify our client ID and signature in the geocoding http request. Is there a way to do this now? It's just two extra parameters at the end of the geocoding request:
&client=gme-YOUR_CLIENT_ID&signature=YOUR_URL_SIGNATURE
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | geocoder-google-business-api-1580512-10.patch | 4.36 KB | bennetteson |
| #7 | geocoder-google-business-api-1580512-7.patch | 5.14 KB | Rob_Feature |
| #6 | geocoder-google-business-api-1580512-6.patch | 4.38 KB | Rob_Feature |
| #3 | google.inc_.patch | 1.38 KB | drm |
Comments
Comment #1
phayes commentedNot currently, but yes, we should add support for that
Comment #2
drm commentedThat might be hard to do if you don't have a license to try it with. The signature actually comes from combining a key with the http request and making a hash out of that. I'm not even sure if their documentation for this is accessible publicly, and in any case, it is has a mistake that I needed to have their tech support point out to me.
I will be out of town next week, but will figure it out and post some code for that early in June. I set this case to postponed for now.
Comment #3
drm commentedThe attached file describes how to change google.inc to work with a Google enterprise account. Note the three Drupal variables that it uses. I did not create a standard user interface form for these as I don't know how you want to structure that. So this is just the internals.
Also, there are two functions provided by Google:
Comment #4
phayes commentedHi @drm,
Three things:
1. Could you re-roll this patch in git format please?
2. Could you add the appropriate config options to geocoder.admin.inc
3. variables should be prefixed with "geocoder", so it should be "geocoder_google_ent_crypto_key" etc.
Thanks!
Comment #5
phayes commentedComment #6
Rob_Feature commentedI'm not much of a developer but here's a git patch with the changes requested in #4. Please review and reformat as necessary.
Comment #7
Rob_Feature commentedThat last patch had some issues with it...here's one that we've confirmed is working on our install. It still needs work, no doubt, but it seems to function properly.
Comment #8
simon georges commentedComment #9
Exploratus commentedNice!
Comment #10
bennetteson commentedThe #7 patch have somes issues. Using variable_get of a setting instead of variable_get of the setting array.
Here a full refactored patch currently used on production.
Comment #11
polHi,
Is this patch still valid ?
Thanks.
Comment #12
basvredelingNo, this patch no longer applies to current dev.
Comment #13
basvredelingI've done some research. The current geocoding api (v3) also includes business accounts. See: https://www.google.com/work/earthmaps/legal/us/maps_included_APIs.html
Also in the license terms there is no mention of VPN restrictions as far as I can tell. See: https://developers.google.com/maps/terms
Since January 6 2016 there is a new premium plan for business users which still includes signing requests. See: https://developers.google.com/maps/documentation/geocoding/get-api-key#p... and https://developers.google.com/maps/premium/overview#digital-signatures
There might still be a need for requests with signature instead of api key but let's update this 4 year old issue first before we continue.
I also question if the original issue (VPN related) is still relevant. Hopefully @drm or @Rob_Feature can shed some light on this.
Comment #14
weboperator commentedYes there is still a need for digital signatures of a requests, but not for all purposes. Here you can find the complete information: https://developers.google.com/maps/premium/overview#authentication-and-authorization
Be careful: The usage within a private network or a closed user group requires a special license. With the "standard" Google Maps API Premium license you are not allowed to use it. Such solutions have to be available for a public user group. See section 3.A of SERVICE ADDENDUM: Google Maps APIs Premium Plan at the bottom of Google Maps for Work Master Terms
There is also a limitation on storage and caching of any content. See section 4.6.E of Google Maps for Work Master Terms
Comment #15
pol