Here's a patch that begins the switch to Keys 2.0.

CommentFileSizeAuthor
gmap.diff1.46 KBgreenskin

Comments

danyg’s picture

I'm very grateful, thanks a lot. My site is working again after update to Keys 2.0.

cronix’s picture

Will this be commited to the latest dev?

mvc’s picture

Version: 6.x-1.x-dev » 6.x-1.1-rc1
Status: Needs work » Reviewed & tested by the community

works perfectly for me, thanks.

dankohn’s picture

This also worked for me and should be committed.

bdragon’s picture

Version: 6.x-1.1-rc1 » 6.x-1.x-dev
Assigned: Unassigned » bdragon

Acknowledged. Will try to remember to do this tomorrow.

bdragon’s picture

Status: Reviewed & tested by the community » Fixed

In my opinion, remaining compatible with both versions simultaneously will ease the transition.

Additionally, I disagree with parts of http://drupal.org/cvs?commit=310498 and have made my code honor it but not require it. Please discuss.

Note: I have A) only desk-checked this, not physically tested it, and B) have not had lunch or supper yet.

I read through the patch many times though and believe my solution is solid.

http://drupal.org/cvs?commit=318748
http://drupal.org/cvs?commit=318750
http://drupal.org/cvs?commit=318752

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pbeakley’s picture

Status: Closed (fixed) » Active

Okay, I'm not great with understanding patches so hopefully someone can chime in here: Has some version of this patch been committed to 1.x-dev? I cracked open my copy of 1.x-dev's gmap.module and there are several references to keys at around line 1165. However, they're different than the .patch AND I'm getting the "Needs new API key" error.

I'm running Keys 2, GMap 1.x-dev, and Domain Access. I've also tried Domain Bonus GMap and it doesn't pass along the correct GMap API either. Or maybe it does, but I get the "needs new API key" error before the map renders.

pbeakley’s picture

Status: Active » Closed (fixed)

Okay, never mind. Got Keys + Domain Access to work just fine. Thanks for the great module!

nick.dap’s picture

I hate to comment on a patch thats been committed, but in no way shape or form should Keys define its own service for GMap! The problem is out of scope for Keys.

The resulting code in GMap module (testing for existence of keys module calling keys function directly) is a mess beyond comprehension. It also causes an error in my install since there are use cases when gmap_keys_service does not return anything which fails a loop in the Keys module.

Please forgive this hit and run message, but Keys is doing something very wrong here...

greenskin’s picture

There is no issue with Keys defining a Google Maps service, the issue would be GMap creating a generic Google Maps service. Where this problem becomes relevant is when an additional module also implements it's own Google Maps service. Both the GMap module as well as the supposed other module needing to use a Google Maps API key should have no problem using the same key. You should not need to assign a Google Maps key to a GMap service and the same key to the other module's service. If both modules simply used the Google Maps service provided in a central location such as Keys or a separate module meant solely for defining services for Keys. The service was more or less intended as an identifier of API keys for Google, Yahoo, and such, not for Drupal modules specifically.

If a module such as GMap still want to provide a service unique to their module, they are free to do so. Though, since the key is still a Google Maps key why can't it be shared among other modules as part of the Google Maps service instead of GMap.

roball’s picture

How is the Google Maps JavaScript API V3 supported? V2 was officially deprecated on May 19, 2010.