Support from Acquia helps fund testing for Drupal Acquia logo

Comments

FranCarstens created an issue. See original summary.

ashwinsh’s picture

Assigned: Unassigned » ashwinsh

I will look for this.

ashwinsh’s picture

Status: Active » Needs review
FileSize
7.91 KB

Hello @FranCarstens,

I have attached a patch for this issue, please review it.

Now users can choose an google api key or a 'for Work' client id. It will also provides a warning on the status report page if an api key or client id is not provided so that users are aware it.

Added configuration link for this module. (Reference Path: /admin/config/content/styled_google_map)

Thank you,
AshwinSh

FranCarstens’s picture

Thanks AshwinSh, I will test this tonight.

FranCarstens’s picture

The patch applied without a problem and the module is functioning perfectly.

Thanks again, AshwinSh!

  • a.dmitriiev committed f7cca19 on 8.x-1.x
    Issue #2761595 by ashwin.shaharkar: Requires API Key. Thanks to ashwin....
a.dmitriiev’s picture

I made the port to 8.x version of this patch. Need somebody to test more.

Special thanks to @ashwin.shaharkar for help.

Manuel Garcia’s picture

Here is a reroll of the patch on #3 that applies cleanly to 7.x-2.x

I've tested this locally and it works, code looks ok to me as well, thanks @ashwin.shaharkar!

ashwinsh’s picture

Thank you @Manuel Garcia for your review.

I have compared your patch file with my patch file, it seems that you just added spaces and removed @file comments code which is not related to this issue.

Regards,

Manuel Garcia’s picture

@ashwin.shaharkar I re-rolled your patch because it would not apply to 7.x-2.x cleanly.

kopeboy’s picture

Which Google Maps API do we need?
Please add documentation.

Maps JavaScript API, or
Maps Embed API ?

I went here to get the key: https://developers.google.com/maps/documentation/javascript/get-api-key#...
and after setting up I immediately got the error
This site has exceeded its daily quota for maps. If you are the creator of this site, please visit the <a href="https://developers.google.com/maps/faq#usagelimits?utm_referrer=v3" target="_blank">documentation</a> to learn more.
even if my website has no visits!

UPDATE: ok, it did that for some minutes, now is back to working.

Manuel Garcia’s picture

Maps Embed API afik, at least thats what I used. Make sure to limit it to the domain you're going to use it for.
UPDATE: Didn't read your update.

ashwinsh’s picture

FileSize
26.2 KB
23.34 KB

Hi @Manuel Garcia,

I have checked my patch file and seems that it is cleanly apply to 7.x-2.x. I have attached two screen-shot for this, please check it.

Thank you

FranCarstens’s picture

Ashwin's patch applied cleanly to 7.x-2.x-dev for me as well. Maybe Manuel Garcia was using 7.x-2.0?

Manuel Garcia’s picture

Your patch would not apply to the git 7.x-2.x branch of the module, which is where the maintainer of the module will need to apply the patch to.

Steps to reproduce:
1. Clone the project:
git clone --branch 7.x-2.x https://git.drupal.org/project/styled_google_map.git
2. Get in to the cloned repo directory:
cd styled_google_map
3. Download the patch:
wget https://www.drupal.org/files/issues/added-google-api-key-configuration.patch
4. Try to apply the patch:
git apply -v added-google-api-key-configuration.patch

Results:

Checking patch styled_google_map.admin.inc...
Checking patch styled_google_map.info...
warning: styled_google_map.info has type 100755, expected 100644
error: while searching for:
dependencies[] = system_stream_wrapper
dependencies[] = geofield

; Information added by Drupal.org packaging script on 2016-05-12
version = "7.x-2.0+0-dev"
core = "7.x"

error: patch failed: styled_google_map.info:4
error: styled_google_map.info: patch does not apply
Checking patch styled_google_map.module...
warning: styled_google_map.module has type 100755, expected 100644
Checking patch styled_google_views/styled_google_views.module...

My patch does apply cleanly to this branch, so the module maintainer can just take it and use that without having to re-roll it himself.

I'm only trying to be helpful here that's all. I attach a screenshot if you're curious =)

  • a.dmitriiev committed f7cca19 on 8.x-2.x
    Issue #2761595 by ashwin.shaharkar: Requires API Key. Thanks to ashwin....
Gertjan.k’s picture

I couldn't get either patches to apply cleanly to the latest release (7.x-2.0). So i rerolled #8 again.

Kaz de Groot’s picture

#17 makes admin_menu flake out due to the problem described here: https://www.drupal.org/node/1622904#comment-10768958

  • ad50c6d committed on 7.x-2.x
    Issue #2761595 by [ashwinsh]: adds required Maps API Key configuration.
    
iampuma’s picture

Added configuration to the 7.x-2.x branch. @KazdeGroot not having any issues though with the admin_menu module.

iampuma’s picture

Status: Needs review » Fixed
a.dmitriiev’s picture

Status: Fixed » Closed (fixed)
metroecho’s picture

The map works when I add the key, but it will not geolocate. Remove the key and no map but will geolocate. I am using IP Geolocation Views & Maps and in the views either config will not have an effect on the views map. Any suggestions ?

a.dmitriiev’s picture

metroecho,

Try to check IP Geolocation Views issue queue. Google Maps API doesn't allow to geolocate without API key. Style Google Maps is using the key only to display the map (that is also required by Google), the module itself doesn't do any geolocation.

I would also appreciate if you give more details. Maybe also with some example links, if possible.