Closed (fixed)
Project:
Openlayers
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Nov 2010 at 19:07 UTC
Updated:
8 Aug 2012 at 12:12 UTC
Jump to comment: Most recent file
An attempt to help push this project toward openlayers release 2.10 and google maps api v3.
For some reason google maps will not show up without the following line of code in google.js
options.projection = "EPSG:900913";
Without that line this error message appears - TypeError: this.projection.getUnits is not a function
Another thing I'm not sure how to explain: the map tiles seem to move before the markers, lines etc.
I will continue to research.
References:
http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/
http://code.google.com/apis/maps/documentation/javascript/basics.html
http://trac.osgeo.org/openlayers/wiki/Release/2.10/Notes
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 968090-D6.patch | 2.88 KB | mathieu |
| google.js_patch-01.patch | 952 bytes | nathaniel | |
| google.inc_patch-01.patch | 1.72 KB | nathaniel |
Comments
Comment #1
nathaniel commentedThe lag between Google tiles and overlays is a deeper issue with API v3 please star this issue to help expedite the process:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=2189
Ref:
http://trac.osgeo.org/openlayers/ticket/2929
Comment #2
Eronarn commentedThese patches enabled me to make use of the dev version of OpenLayers, which includes the new getFeaturesByAttribute function. This is very useful with Views integration because all of the Views fields are stored there. So, thanks very much for that!
In addition to the pan lag issue, I'll point out that there is an attribution popup issue: http://www.mail-archive.com/openlayers-dev@lists.osgeo.org/msg00496.html
They have several solutions there, but I thought they might come in handy to someone else.
Comment #3
christiaan_ commentedThank you for this - After applying the patch, there were several pop-up credit windows appearing on the Google Maps.
I added
?v=3.2to the Google Maps URL in google.inc and the pop-ups disappeared.So the google URL in the patch for google.inc changes from
http://maps.google.com/maps/api/js?sensor=falseto:
http://maps.google.com/maps/api/js?v=3.2&sensor=falseif you need Google Maps SSL support (now available to all) change the URL to :
https://maps-api-ssl.google.com/maps/api/js?v=3.2&sensor=falseComment #4
Remon commentedbump
Comment #5
zzolo commentedShould be fixed in 7.x-dev.
http://drupalcode.org/project/openlayers.git/commit/b6712d2
Going to make 2.10 the default soon.
Comment #6
zzolo commentedOh, also, I made an option for the Google Layer type (in the API keys section) to use v3 of the Google Maps API.
Comment #8
miklThis should probably be merged for Drupal 6 as well.
Comment #9
mathieu commentedHere's a first try at a backport to D6. Not sure about it though. Google refuses to provide me with a map if I don't provide a key. Maybe it's something about my site...
Comment #10
zzolo commentedThank you so much for the path. Committed:
http://drupalcode.org/project/openlayers.git/commit/855afa2
I did not run into any Google messages about API keys, so not sure.
Comment #12
hvalentim commentedDoes not work here.
Using 6 dev from 26 August with Openlayers 2.10 the map shows empty and an inspection gives:
jsmin.js has:
Using OpenLayers 2.08 it works fine.
Comment #13
miguered commentedHi all, looking for a way to display map routes using the google api, does anyone know how to? Im using openlayers and i would like to display my routes qith the google api, so i can have all the benefits of google maps like routing, how to get there, etc..
Is there any code/module to do this?
Im D7, OL 3.x.
Thanks very much.