Hi all - Opening a new issue rather than re-opening #968090: Compatibility with OpenLayers 2.10 and Google Maps API v3
Working with the 7.x-2.x dev on a client site and was trying to get them set up to use the v3 API. Set the version in the Openlayers config with no API key and all page displays using Google maps give the pop up that an API key is required. I started to do some digging and found that the $url variable being built by render() in google.inc differs fairly significantly from the url given in the v3 API docs - however, while modifying the variable to more closely follow the documented example keeps the API key popup from appearing, no maps are displayed, and I see the error ReferenceError: G_NORMAL_MAP is not defined in the console. Anyone else having similar issues with the -dev branch?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | openlayers-googlemapv3-1268210-2.patch | 2.88 KB | nod_ |
Comments
Comment #1
jeffschulerSubscribing. I had the same issue.
Comment #2
nod_Here is a patch that enable v3. It shouldn't break anything that is on v2.
I tried to show the api key field only when v2 is choosen, but i couldn't make ctools to work.
I made v3 the default choice and I bumped the version to 3.5.
Comment #3
nod_Comment #4
nod_Comment #5
zzolo commentedHey @nod_. Many thanks for the patch. Committed.
I am curious if you get the big attribution box? Screenshot: https://skitch.com/zzolo/gfxej/openlayers-openlayers7
It does not show up in this example: http://openlayers.org/dev/examples/google-v3.html
Maybe its just because I am on 2.10? I don't have much time to look into this.
Comment #6
nod_nope, never saw this while I was testing gmap.
Comment #8
svrontis commentedHi... i am new at drupal...
I am trying to make this code works (in php mode) and I get NOTHING:
Does anyone can help me?
Comment #9
nod_Hello, please open a new issue as a "support request" or ask for help on IRC: #drupal or #drupal-geo. What you're asking is not a reason to reopen this one.
Thank you.
Comment #10
spgd01 commentedIn 6.2.x.dev
I am trying to use the v3 maps. If I select v3 in the settings and do not supply a key then the maps do not work. I get:
This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/documentation/javascript/v2/introduction.html#Obtaining_Key.
I then put in my API key and in Google turn on services for API v3 and trun off API v2 and get the following error:
Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v2 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: http://code.google.com/apis/maps/documentation/javascript/v2/introduction.html#Obtaining_Key
So in google I turn API v2 back on in services and maps are working.
This tells me that openlayers is looking for API v2. It is not using API v3. Am I doing something wrong? Do i need a different API Key? is this a bug?
Comment #11
spgd01 commentedAny Help?
Comment #12
spgd01 commentedOk I works. There is a conflict with get directions module.