Continuing issue #818638-193: Update to use Google maps API V3
This topic was used for D7 release (first alpha release gmap 7.x-2.3-alpha3)
But starting from #1459606-72: [CLOSED] Backport from D7 to use Google maps API V3 for D6 6.x-2.x-dev we need backporting to D6 for 6.x-2.x branch
Any help welcomes. Thanks!
old summary for D7 release
Support for API ver3 is under the development, this feature is available from git repository.
$ git clone --branch 7.x-2.x http://git.drupal.org/project/gmap.git
And zip archive is also available from my github page.
(This is not necessarily the newest, because it is synchronized manually)https://github.com/haiiro-shimeji/gmap/zipball/7.x-2.x (directly link)
Unzip this archive, then you get a directory named "haiiro-shimeji-gmap-*".
This is the patched gmap module (full files).
Rename this directory to "gmap", and move this to the modues/ directory in drupal home.
To upgrade from 7.x-1.x version, you should just replace the code to 7.x-2.x.
And if you have some problem, you can revert safely with replacing 7.x-1.x code again.
Comments
Comment #1
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedpatch code
Comment #2
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedThis is an equivalent patch code for D7 to 818638 #120.
http://drupal.org/node/818638#comment-5593160
Comment #3
aspitzer CreditAttribution: aspitzer commentedHello
Thanks for the patch. I'm trying to install it on D7 via SSH but i can't. I have tried to make it directly from withing the gmap folder but the patch does not work.
Could someone please send the right syntax to patch this file via ssh?
(we have read the dec posted here http://drupal.org/node/238692 and nor with patch -p0 or simply < work)
Some help with it?
Thanks
Comment #4
mzanon.stoneward CreditAttribution: mzanon.stoneward commentedMany thanks for your hard work! This is an update that the GMap module sorely needs!
One small suggestion that came to mind: in your patch, js/marker.js still has calls to a few v2 API methods:
openInfoWindow() [line 93]
openInfoWindowHtml() [line 111]
openInfoWindowTabsHtml() [line 122]
Since this a patch for GMap API v.3 compatibility, would it make sense to re-implement these via instantiations of google.maps.InfoWindow()?
Comment #5
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedGoogle Map API Key is no longer available and there is no need for API request,
so I remove the input from GMap settings.
@aspitzer
These patch codes is for git repository. Use the patch as follows.
$ git clone --branch 7.x-1.x http://git.drupal.org/project/gmap.git
$ cd gmap/
$ git apply [patch file]
The details is described in this page.
http://drupal.org/node/33591/git-instructions
@mzanon.stoneward
Thanks for your suggestion, Those functions are replaced in this patch.
And these changes is applyed to the forked repository in github, too.
Comment #6
htalwala CreditAttribution: htalwala commentedSorry I'm kind of a noob, how exactly do you use this patch? Where do I put it? I am assuming I need this patch to get the maps to display, because they are no longer displaying using the V3 Google Maps API.
Comment #7
aspitzer CreditAttribution: aspitzer commented@haiiro.shimeji
Thanks for the info but I can`t manage to make Git work....
Would you mind uploading the patched files instead? It would be perfect!!
Thanks for your help!!
Andres
Comment #8
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedOk, you can use the zip ball instead of applying the patch.
Download the zip ball from the following url (directly link).
https://github.com/haiiro-shimeji/gmap/zipball/7.x-1.x-gv3
EDIT: zip archive is available from the link written in the top of this thread.
Unzip this archive, then you get a directory named "haiiro-shimeji-gmap-*".
This is the patched gmap module (full files).
Rename this directory to "gmap", and move this to the modues/ directory in drupal home.
Comment #8.0
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedThis feature was applied to 7.x-2.x, so change the description.
Comment #9
aspitzer CreditAttribution: aspitzer commentedThanks @haiiro.shimeji
I have uploaded the patched module. Now I son't se the api key warning anymore but still the maps are not showing up. Also I do not see the map for selecting the LAT LONG when I am creating new content.
What else should I check?
Thanks!
Comment #10
aspitzer CreditAttribution: aspitzer commented@haiiro.shimeji
I had tghe module under sites/all/modules. I movet it to the drupal root/modules and it worked.
Thanks a lot!!
Comment #11
caktux CreditAttribution: caktux commentedPatch in #5 works fine
Comment #12
webcultist CreditAttribution: webcultist commentedI can approve #5, works for me!
Comment #13
taladega CreditAttribution: taladega commentedHello, any updates for Drupal 6 and the Google API V3.
Our sites are getting old and tired, We depend on Drupal community to keep our Free Organisations sites alive.
Helping people all over the world.
It is just too costly to upgrade and redo a site when you only need a few modules to upgrade.
Please make this module compatible with Drupal 6 and Google API V3.
Thanks you.
Comment #14
taladega CreditAttribution: taladega commentedHello, any updates for Drupal 6 and the Google API V3.
Our sites are getting old and tired, We depend on Drupal community to keep our Free Organisations sites alive.
Helping people all over the world.
It is just too costly to upgrade and redo a site when you only need a few modules to upgrade.
Please make this module compatible with Drupal 6 and Google API V3.
Thanks you.
Comment #15
izmeez CreditAttribution: izmeez commented@taladega Please don't hijack the issue, this is for Drupal 7.
If you read the first post in this thread you would have seen the answer to your question, here it is http://drupal.org/node/818638#comment-5593160
Comment #16
Patrizio CreditAttribution: Patrizio commentedI had a problem on gmap_taxonomy.info but the patch works well. TY
patching file gmap_taxonomy.info
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file gmap_taxonomy.info.rej
Comment #17
hutch CreditAttribution: hutch commentedThe patch in #5 applies cleanly on a fresh clone of gmap 7.x-1.x.
On configuring gmap one bug has come up straightaway:
On line 20 of gmap_settings_ui.inc is
The variable table in D7 does not have 'file_downloads' and the constant 'FILE_DOWNLOADS_PUBLIC' does not exist either. The fix is simple, replace the above with
The following is not a bug but should be done for better control of the map.
In Googlemaps v3 the 'navigationControl' has been replaced by 'zoomControl' and 'panControl' although it still works.
Comment #18
MXTI've installed files from zip in #8, and I get the following error in the Gmap admin settings page:
Notice: Use of undefined constant FILE_DOWNLOADS_PUBLIC - assumed 'FILE_DOWNLOADS_PUBLIC' in gmap_admin_settings() (line 20 of /var/www/my-site.it/sites/all/modules/contrib/gmap/gmap_settings_ui.inc).
Despite the error, all works fine
Thank you
UPDATE:
Applying the suggestion in #17 the error disappear
Comment #19
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@hutch, thanks for your indication.
I apply your code about the FILE_DOWNLOADS_PUBLIC problem to the zip ball, and make the new patch.
Zoom and pan controll is available by setting the macro 'control=Large'.
But v3 supports more controls (street view control etc.), it is good that this module also supports it.
Comment #20
adraskoy CreditAttribution: adraskoy commentedDownloaded the dev release and added the patch in #5 and the edit in #17. Also had the "hunk 1" failure, but I think that's probably not a problem.
Most of the functionality seems to work, except I don't get a gmap location picker. I'm using "Location CCK" as opposed to "node location". Is anyone getting the location picker with this version/patch? [EDIT: got that working-- a configuration issue.]
Also, any ideas on how to enable controls like street view and mobile location? I'm willing to put some work into getting this all going, but I'm not particularly familiar with the module.
Comment #21
Xomby CreditAttribution: Xomby commentedWith the patch and mod, this works pretty good. But, one huge issue(to some maybe, to me definitely) is the "center on node argument" option in views->user_location_table->Format->GMap->Settings only seems to work with NID, and I'm using a view of user locations (UID). The resulting drop down is completely empty.
Going to take a look and see if I can find somewhere to differentiate between them, will post a patch if I get something going.
[edit] No, I'm not, I'm just going to re-do the site logic and use nodes to track these. If you want an authenticated user to be forced to create a node after registration, but before they can do anything else on a website, use the "checklist 7.x alpha" module [/edit]
Comment #22
Selfirian CreditAttribution: Selfirian commentedHi adraskoy,
I have the same issue with the marker not showing, could you share what you did to get it working?
I'm really a noob on this.
Thx in advance
Comment #23
Macronomicus CreditAttribution: Macronomicus commentedhaiiro.shimeji
Seems to mostly work, only thing is I cant seem to get the popup bubbles to work or taxonomy based markers.
Comment #24
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedThanks for your testing.
@Xomby
I wonder User location module is not supported for D7 according to http://drupal.org/project/location #Important section.
Actually nothing is displayed in /location/users despite of my setting..
@macrocosm
It seems popup bubble is working..
Have you setup the views setting? Choose edit "location table" in admin/structure/views, click Gmap setting in "Format",
and check "Display a tooltip when hovering over markers" in the setting dialog.
About taxonomy marker, I don't know how to use it.. Can't it set up the original marker??
Comment #25
mdotcomegypt CreditAttribution: mdotcomegypt commentedI applied patch in #19 but still giving me the same error http://maadiguide.com/
Comment #26
dshaw66 CreditAttribution: dshaw66 commentedPardon my ignorance, but I got the new gmap moved over and now I see a map of the US, it's not zooming into street level. Did I miss something?
You can see at http://bluebonnetcountrygc.com/ready-to-play/location that it should be zoomed into the course location based upon the Location Module but it's not working right.
Thanks,
Danny
Comment #27
lgmanchego CreditAttribution: lgmanchego commentedI put the #8 patch in my root modules folder and it crashed my site. Does anyone have advice about what do to to get the site running again without starting over completely? I already deleted the patch and the gmap module and my site won't load. Any insite into why this happened will be so appreciated!
Comment #28
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@lgmanchego
This patch have no change for database.
Remove the patched module and put the old one, I think your site will be restored safely.
What does "crashed" mean? No page is displayed in your browser?
If that's the case, change display_errors parameter to "On" in the php.ini, please tell me the error messages.
Comment #29
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@dshaw66
I think there is no problem about zoom-in in my site..
It seems to be able to set up the max zoom level in Configuration -> GMap "Maximum initial zoom". Try to change this value to "17".
(but I wonder this restriction is not functioning..
Comment #30
dshaw66 CreditAttribution: dshaw66 commentedThe map is using the Location module on the page to show the location of the course on the map. I can physically zoom into the map, but there is no marker and it's not going to the course location. Sorry that I didn't clarify.
EDIT: OK, that worked for it zooming in to the correct level, but the marker isn't showing. What am I missing for that to come back?
Danny
Comment #31
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@dshaw66
Sorry, I still have some questions..
There are some ways to display locations, so I cannot decide what kind of method is used.
Is the problem caused in Node Location page (/location/views)?
Are locations input by Location CCK or Node Location?
Comment #32
dshaw66 CreditAttribution: dshaw66 commentedI believe it's being input via the Node location, because on the content page I add the location to it in the Location area at the bottom. The map now zooms into the actual location correctly, it's just not showing a marker pin at the address location on the zoomed in map.
Thanks again!
Comment #33
adraskoy CreditAttribution: adraskoy commentedSelfirion, I don't recall the spot right now, but digging around there was somewhere where you have to say that you want a location picker. Maybe in the content type configuration for that field?
Comment #34
Macronomicus CreditAttribution: Macronomicus commented@haiiro.shimeji
It appears your changes do not yet work with the location field, I get the same as the others, no markers appear.
Comment #35
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedSorry, there is no problem for me about markers appearance.
Someone has the same problem, please show me the gmap setting section in Drupal.settings.
Drupal.settings is in the javascript section in HTML code view.
Be careful not to include private information.
Comment #36
Ashvin Lakshmikantha CreditAttribution: Ashvin Lakshmikantha commentedDear all,
I am using the form API to build new forms. I need to include a google map in the form and place some markers based on the position of the users.
I see that a lot of work has been done on google map api. However, I am not able to understand how to use it. If anyone can provide simple (but detailed) examples explaining how to use this api, it would be extremely helpful. I am at loss of how to use the immense module, without a help guide.
Thanks,
Ashvin
Comment #37
Macronomicus CreditAttribution: Macronomicus commentedAshvin,
This thread is not about documentation, its about a rewrite of the module, which hasn't been updated in a long time.... haiiro.shimeji has been kind enough to take the gmaps 3x api integration on, but there are still other bugs to contend with, unrelated to what he's done. The standard documentation mostly still stands, just keep in mind 7.x branch is still pretty buggy.
Im changing this to critical because google is likely to drop support of the 2.x api sooner rather than later and then gmap wont work at all.
Comment #38
hutch CreditAttribution: hutch commented@haiiro.shimeji, apply to be a maintainer, then perhaps something will be done.
gmap 7.x.2.x-dev for starters
Comment #39
neochief CreditAttribution: neochief commented#19 works for me.
Comment #40
bdragon CreditAttribution: bdragon commented@haiiro.shimeji:
I just forked a 7.x-2.x branch and merged your branch from hithub in.
Comment #41
bdragon CreditAttribution: bdragon commented@all
haiiro.shimeji now has commit access to the repo.
Comment #42
hutch CreditAttribution: hutch commentedThis is good news for Gmap.
@haiiro.shimeji, I will contribute a fully reworked marker system which I have deployed in Getlocations. It came from Gmap in the first place and makes full use of the v3 API, proper shadows, anchors, shapecoords and shapetype. A hook can be added that will allow other modules to add their own marker sets. If the Libraries module is present (or better still required) then markers can be stored in the libraries folder or in themes.
Other features will be better pathing to the cachefile, support for public/private and using Drupal's file_stream_wrapper method and use unmanaged to save the file, managed is for uploads and a cache does not need a record.
I will also fix that silly business of 10 letter markers and 26 number markers.
Let me know if you want this.
Comment #43
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@hutch
Thanks for your information!
I'm trying getlocation module..
Comment #43.0
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedadd description for zip-ball.
Comment #44
MXTI think that all functionalities developed by Hutch in his getlocation module will be very useful also in GMap.
Thank you guys for working on this!
Comment #45
Xomby CreditAttribution: Xomby commentedGood stuff... but one stupid question still lingers in my mind... would it not make more sense to abstract the API calls out of the module, and into a separate module that just handles standardizing the API calls with acceptable fallbacks by default and user-selectable fallbacks where possible for deprecated functions?
May be a good rule of thumb for any 3rd party API... this way the API could advance, and the module would be forwards compatible with a newer version of the API, until it could catch up with any NEW functionality of that API... and potentially backwards compatable at the same time with an older version of the API (sometimes you just don't have a choice)?
Comment #46
sachin00700 CreditAttribution: sachin00700 commentedPatch in #5 works fine works for me!
Comment #47
mmowers CreditAttribution: mmowers commented@haiiro.shimeji
I believe I'm having a similar issue as others. I am using a gmap view of locations of nodes (using a location field) and the markers are not showing up when I use your latest version (7.x.2.x-dev, http://drupal.org/node/1532336), whereas the markers do show up when I use 7.x.1.x-dev.
Thanks for all the work you've done!
-Matt
Comment #48
hadim CreditAttribution: hadim commented@mmowers: try to apply my patch from here : #1218870: Marker managers give wrong path to marker icon when Drupal is not installed at root.
@haiiro.shimeji : are your still porting gmap to Google Maps API v3 ? Because I have some patch I would like to submit to you : #1218870: Marker managers give wrong path to marker icon when Drupal is not installed at root and #1565792: MarkerClusterer is not working and #774078: ExtInfoWindow for GMap - Styling the info window for Google Maps. The last patch is not from me but it would be awesome to have it to. However it needs some works to work with your Gmap version.
Comment #49
mmowers CreditAttribution: mmowers commented@hadim: Thanks much for the patch, but it did not do the trick for my problem. Bear in mind that I am not doing any marker clustering, and my gmap view works fine on 7.x.-1.x-dev. Also, for some reason I couldn't apply your patch directly. I believe the issue may be these lines in your patch:
In any case, I ended up just applying your changes manually, and I still was not able to see markers on my map.
@haiiro.shimeji: I just noticed that, when I load my gmap view page, javascript throws an error: "Uncaught ReferenceError: GMarkerManager is not defined" on line 20 of gmarkermanager_marker.js:
(This occurs with or without hadim's patch). Does anyone know if GMarkerManager is used in google maps api v3?
Thanks again,
Matt
Comment #50
hadim CreditAttribution: hadim commented@mmowers: sorry but I didn't got this bug and I have no idea where it may come... GMarkerManager is working fine for me.
Good luck !
Comment #51
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@mmowers
Thank you very much! I got the same error.
I'm trying to fix this, but it seems so difficult..
I make the issue #1573062.
@hadim
Thanks for your notification. I'll check the patches and apply.
Comment #52
haiiro.shimeji CreditAttribution: haiiro.shimeji commented@mmowers
I make a patch code in http://drupal.org/node/1573062,
This is trick for javascript error, but I cannot make sure markermanager is working correctly..
please try it.
Comment #53
mmowers CreditAttribution: mmowers commented@haiiro.shimeji: Thanks!! Your solution worked for me. I'll let you know if I run into any more issues.
Thanks again!
-Matt
Comment #54
Marko B CreditAttribution: Marko B commentedI installed d7.2 version from here http://drupal.org/node/33591/release?api_version%5B%5D=103
this is all on new d7 installationa and i can't make maps appear, there is also a "Google Maps API Key" field in this version which you said will be removed?! Needing some help with this.
Installed location and gmap module, done this before with d6 many times and I know how to do it, but now I can't get any map to display?
Comment #55
Marko B CreditAttribution: Marko B commentedI recommend switching to http://drupal.org/project/getlocations it contains most of the gmaps and location module in it and does it better.
Comment #56
podarokreleased alpha release for 7.x-2.x
please. help with test and bug fix
Comment #58
tmsimont CreditAttribution: tmsimont commentedIt sure seems like the API key is not necessary anymore, but it's still a field on
/admin/config/services/gmap
Also -- it looks like 2.x-dev was patched to remove the
variable_del("googlemap_api_key")
but the field on the settings page still creates that variable...Comment #59
tmsimont CreditAttribution: tmsimont commentedAlso line 134 of
gmap_gmap()
:i see key and hard-coded ref to v2?
Comment #60
tmsimont CreditAttribution: tmsimont commentedAlso -- I'm seeing total removal of the Key in this patch, but according to Google:
Shouldn't we still be supporting a key?
Comment #61
tmsimont CreditAttribution: tmsimont commentedalso -- looks like baseURL of google maps is wrong:
should be "maps.googleapis.com/maps/"
(https://developers.google.com/maps/documentation/javascript/tutorial#Loa...)
Comment #62
tmsimont CreditAttribution: tmsimont commentedAttached is a patch that address my last few comments.
Summary:
variable_del()
in gmap.installComment #63
Sylvain_G CreditAttribution: Sylvain_G commentedThere is still some code from v2 API
ReferenceError: GLatLng is not defined
[Stopper sur une erreur]
pa.push(new GLatLng(n[0], n[1]));
in http://test.loc/sites/all/modules/contrib/gmap/js/gmap_shapes.js Line 40
hope it helps
Comment #64
podarokcan someone review this patch for creating initial Goodle v3 dev version for testing on alpha(beta) versions?
#62 looks good for me, but I have no possibility to test it on production now
Comment #64.0
podarokadd the description for upgrading from 7.x-1.x
Comment #65
podarokAll I need - patch against latest 7.x-2.x-dev for review
Comment #66
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedI applied this patch to the latest 7.x-2.x and it seems to work fine.
I wonder the old variable 'googlemap_api_key' also should be removed when the module is uninstalled,
because this might be registered before the module is upgraded from 7.x-1.x.
If anyone have no problem, I'll commit this patch to 7.x-2.x branch.
Comment #67
podarok#66 looks good
Please - commit it into 7.x-2.x for testing
I think that we can generate beta release later here for a lot of testers activity
Comment #68
tmsimont CreditAttribution: tmsimont commentedMaybe that should go into an update function rather than the install?
Comment #69
tmsimont CreditAttribution: tmsimont commentedre-rolled (still not deleting old 'googlemap_api_key' though, let me know if i should add..
Comment #70
podarok#69 looks good for me
commited pushed to 7.x-2.x-dev
Please, open follow up issue for right "deleting old 'googlemap_api_key' "
Thanks to all!!!
Comment #71
podaroktagged alpha-3 release http://drupal.org/node/1904578
Comment #72
podarokthis needs backport to D6 as requested from #818638-193: Update to use Google maps API V3
6.x-2.x branch created for this
Comment #72.0
podarokUpdated issue summary.
Comment #73
hutch CreditAttribution: hutch commented@podarok, good to see the Gmap module being kicked out of the long grass.
I am the maintainer of Getlocations and if you want code to get markers working for Google v3 I would suggest you "borrow" it from Getlocations, I "borrowed" it from Gmap in the first place ;-)
In particular,
getlocations/js/icons.js
getlocations/getlocations.markerinfo.inc
and functions
getlocations_get_marker_titles()
getlocations_get_icondata()
getlocations_regenerate_markers()
getlocations_get_markerfile()
getlocations_getlocations_markerdir()
(I think that's all)
There are links on the project page for markers with .ini files, shadows etc.
put marker folders in "libraries/gmap/markers"
There are some minor differences between D6 and D7, mainly to do with how files are accessed.
With any luck you should be able to get most of it working by renaming and search and replace "getlocations" with "gmap"
It might work :-)
Comment #74
tmsimont CreditAttribution: tmsimont commentedShouldn't we get hutch's marker and icon code in here before we start backporting?
Comment #75
podarok#73 can You provide a patch against 7.x-2.x-dev?
Comment #76
hutch CreditAttribution: hutch commentedAt the moment I'm very pushed for time, I don't have a Gmap testrig set up and haven't looked at the Gmap code in at least a year, that is why I did not offer a patch in #73.
Someone who knows Gmap in its current dev state will be much better placed to get this going.
Comment #77
tazbambu CreditAttribution: tazbambu commentedThank you for this excellent module and the efforts you ' ve put into!
I'm testing the 7.x-2.x-dev along with the Location Module (7.x-3.0-alpha1) and my custom markers.
Everything seems to be working perfectly at the moment, nodes display locations correctly and showing the right custom marker.
The only problem I face is that I have a VIEW where:
It shows the right locations but I need to use the marker that I' ve chosen at each taxonomy term for the specific vocabulary.
"Marker / fallback marker to use " is set to Default, but instead of my custom marker, it returns a red one from the defaults of the module.
Am I missing something?
That's the way my VIEW works right now for me with GMAP 7.x-1.0-beta1 and LOCATION 7.x-3.0-alpha1.
Sorry for my long writing and actually I am not sure if this is the right place to report such kind of problem , excuse me again if I'm wrong!
Comment #78
Summit CreditAttribution: Summit commentedHi,
I think this needs backport to D6 now as @Hutch is not bringing the marker and icon code in within reasonable time and it is requested from #818638-193: Update to use Google maps API V3, right?
Greetings, Martijn
Comment #79
rjay CreditAttribution: rjay commentedHere is a patch for 6.x-2.x-dev to get things moving for D6. This is a backport of the patches in #19 and #69.
Comment #80
Summit CreditAttribution: Summit commentedHi, can someone make a D6 winzip maybe which I can test. I am not able to execute patches right now. Thanks in advance.
greetings, Martijn
Comment #81
podarok#79 commited pushed to 6.x-2.x-dev
thanks!!!
will be tagged in next 6.x beta release soon
Comment #82
podarok#80 You can try it here http://drupal.org/node/1926766
Comment #83
rjay CreditAttribution: rjay commented#79: Backport_from_D7_to_use_Google_maps_API_V3_for_D6-1459606-79.patch queued for re-testing.
Comment #85
podarok#79 commited! )))
It can`t be tested anymore - it is already in repo!
Comment #86
ocanzillon CreditAttribution: ocanzillon commentedWhen you use a view with GMap display style, marker popups don't display. It works well with 6.x-1.1 version.
Comment #87
ocanzillon CreditAttribution: ocanzillon commentedSorry... It works when the option "Marker action" is set to "Open popup". In 6.x-1.1 version the popup displays even if this option is set to "Do nothing".
Comment #88
podarokThis one needs tests
use /tests/gmap.test for that
Comment #89
dway CreditAttribution: dway commentedAny news on the test phase of the backport ? Can't test right now.
Comment #90
fizk CreditAttribution: fizk commented6.x-2.x-dev works for me after removing the check for a Google Maps key:
Comment #91
iancawthorne CreditAttribution: iancawthorne commentedConfirmed, the same as #90 for me.
Comment #92
hutch CreditAttribution: hutch commentedHere is a patch
Comment #93
james.morris CreditAttribution: james.morris commentedAny updates on this? Does anyone know when we might have a fully tested version?
Thanks,
James
Comment #94
jaxxed CreditAttribution: jaxxed commentedjames.morris: I just checked out a git copy and there is lots left to be done. I'm new to gmaps.module, and only about 10 minutes into investigation, but I would say that the map generation itself is good, and markers seem ready, but much of the related functionality is barely converted. I see all sorts of v2 syntax all over the place (GLatLng, GMarker) and the PolyLine/PolyGon stuff looks v2. I also see lot's of commented code all over the place (whole handler functions.)
[edit:] Wanted to add that the geocoding looks like it works with v3.
This month we'll likely have lot's of help as the May 19 deadline is looming. We (wunderkraut) have a couple of clients that need some of the advanced functionality, so I'll add what I can to this effort.
Comment #95
james.morris CreditAttribution: james.morris commented@Jaxxed
Yeh. I've tried it out too. I find the same GeoLocation doesn't work just returns the default 0,0 long lat. Problem is that Google Maps are turning off the V2 of the API in May apparently.
Comment #96
jaxxed CreditAttribution: jaxxed commentedI have finished going though the code and have the remaining items patched for v3 (still testing everything)
I've made the following changes:
1. updated various left over GMarker Calls,
2. made some jquery optimizations (pooled sequential .addClasses)
3. made some google.maps. optimizations (switched some addEventListener to addEventListenerOnce)
4. switched a number of the GPolygon circle implementations to google.maps.Circle;
5. upgraded GPolygon (only found one) to google.maps.Polygon
6. used google.maps.MVCArray in a few places where [{google.maps.point}] was previously used.
As I am new to this thread, I've messaged podarok, who seems to be the most recent maintainer for the code, to see what the best way to push these changes is. I don't know that it makes sense to post a patch with such a large change.
If there is demand, I will consider:
1. posting that patch
2. assigning myself to the ticket
3. helping others with the patch/responding to individual requests.
I am now going into testing on the work that I did, as I upgrade a client site. I should be able to test most of it today.
Comment #97
jaxxed CreditAttribution: jaxxed commented#95 james.morris: I'll take a look at the geolocation. It looks like it should work, but I'll try to test it out and see why it isn't.
[edit:] j.m: can you write a test case for it?
[edit:] @james.morris : is the php geolocation failing, or the js geolocation?
I am not worried about the May 19 deadline yet. There is still lot's of time to fix this, and I can fit some hours to a billable client on the fix.
Comment #98
jaxxed CreditAttribution: jaxxed commented#92 hutch: the only problem with your fix is that google maps v3 can work without a key now.
https://developers.google.com/maps/articles/v2tov3#newkey
Comment #99
jaxxed CreditAttribution: jaxxed commentedDoes anybody know what this is: GMarkerManager() ?
Comment #100
james.morris CreditAttribution: james.morris commented@Jaxxed:
I am afraid that I don't know which part of the Geolocation is failing. We performing client monthly (in this case April's) updates on critical and out of date modules. The client only really pays for the updating, they have to request and pay for any further investigation.
In terms of a test case.
We have the locations field on an events content type and have tried the following with both the V2 and V3 API key.
Add your home address with postcode.
Satisfy any other mandatory fields.
Save the node
View the node
Map should appear (on V3) but centred on the 0,0 long lat.
Sorry if that's not detailed enough. Let me know if you need more.
Cheers
Comment #101
hutch CreditAttribution: hutch commented@jaxxed, the patch in #92 removes the check as it is no longer required.
Comment #102
podarokbot
Comment #103
acrazyanimal CreditAttribution: acrazyanimal commentedIs there a recommended upgrade procedure for jumping between 6.x-1.x and 6.x-2.x. I see that you loose your api key.
Comment #104
jaxxed CreditAttribution: jaxxed commentedMaybe you lose your key because v2 keys are not compatible with v3
Comment #105
jaxxed CreditAttribution: jaxxed commentedJust a quick note about working with the 6.x-2.x:
I've had no problems with the gmaps libraries, using Drupal.gmaps directly. I've been using this:
1. gmaps creation
2. gmaps markers, and custom .binds around marker events.
I did get some errors that I am hunting out, but I think that they are related to custom code.
There is only 1 vague issue right now that my related to delays in display, that sometimes gmaps v3 doesn't handle well. I've solved some problems by trying to pass centering and zooming info on map creation, instead of after ... but I can't confirm that it's worthwhile pushing that to the module repo.
I would appreciate it if anybody could provide test cases for the following:
1. address geo-location that is failing
2. use of shapes that worked in gmaps v2
Comment #106
dway CreditAttribution: dway commentedHi !
I'm testing the 2.0-beta1 with patch from #92.
I've created a new gmap API key V3 and use shapes directly in a template page on a production website : AAAR : that's the color around districts of the region Centre in France.
So it works well on the 1.x plugin but not in the 2.0-beta1.
Here is the way I echo it in my template :
https://gist.github.com/nderambure/5405526
And here is the console error I got :
Uncaught ReferenceError: GLatLng is not defined
in the file gmap_shapes.js at line 35.
Note that my markers work perfectly (with a little CSS adjustements), if I remove the 'shapes' parameter.
Hope it helps !
Comment #107
musojon74 CreditAttribution: musojon74 commentedHappy to help testing here, too. Basic marker functionality appears good and maps set up for v2 on live site work very well on v3 on dev site so far. Again all worked after I removed the v2 api check patched above. I will test the shapes and report back.
Comment #108
james.morris CreditAttribution: james.morris commentedHi,
We've managed to get our GMaps geo-location working again by doing the following.
1) Update the GMaps module to 2.0-beta1
2) (Crucial bit) update the location module to version 3.3-beta3
3) Once you've done this update the GMaps with your V3 Google Maps API key.
4) Ensure you have JS Optimise enabled under Performance settings.
4) Clear the caches, then do it again for luck (last cache clear optional).
5) Try create a test node with new address for Geo encoding.
6) Check the node you should now have a geo-encoded map marker.
This is not fully tested. It seems to work but because it relies on beta version of the Gmaps and Location module make you and you clients test thoroughly.
I hope that help.
James
Comment #109
Summit CreditAttribution: Summit commentedHi,
I thought google didn't have an API-key anymore after V2?
I refer to this part:
greetings, Martijn
Comment #110
tmsimont CreditAttribution: tmsimont commentedAPI key is optional in V3 -- if you enter it you can review metrics at https://code.google.com/apis/console
Comment #111
cosmos11 CreditAttribution: cosmos11 commentedAccording to Google @ https://developers.google.com/maps/documentation/javascript/v2/reference
...
Note: The Google Maps JavaScript API Version 2 has been officially deprecated as of May 19, 2010. The V2 API will continue to work until May 19, 2013. We encourage you to migrate your code to version 3 of the Maps JavaScript API.
...
It says the V2 API will continue to work until May 19, 2013. Does it mean GMap 6.x-1.x will stop working on that day?
Thanks!
Comment #112
podarok#111 yes!
Comment #113
cosmos11 CreditAttribution: cosmos11 commented@podarok
Thanks for your confirmation.
Comment #114
Sansui CreditAttribution: Sansui commentedHrm, looks like I have some sites that need this upgrade as well, currently on 1.x
Will probably be doing some test upgrades around May 6th, will add my comments on experience with patches after that
Comment #115
anrikun CreditAttribution: anrikun commentedPatch at #92 works.
Why is this issue marked as needs work then?
Comment #116
jaxxed CreditAttribution: jaxxed commentedupgraded on JS file, to upgade v2->v3 google maps shapes calls. Changed the 'circle' shape to no longer be an rpolygon.
I've tested the circle, lines, polygons (encoded and from points, and from points coming from google.maps.directionsService)
I wasn't sure if this was ready to submit, but I thought that I would post it and see what comments it gets. There aren't really any tests for this kind of a patch.
J
Comment #117
jaxxed CreditAttribution: jaxxed commentedstupid me, changed the title back
Comment #118
jaxxed CreditAttribution: jaxxed commentedchanging to needs review to get the patch I wrote tested
Comment #119
dway CreditAttribution: dway commentedThx jaxxed, I'll test this new patch this week-end and report back here.
Comment #120
jaxxed CreditAttribution: jaxxed commentedHighlight JS needed upgrade to v3. I did it and then realized that you had some new code for D7 that was v3 compliant.
I didn't like the new D7 highlight approach, and submitted a patch that was tested in the D6, but is D7 compliant (only JS changes). I don't like how highlight.js has only global functions for marker highlights, and how marker.js has highlight events embedded.
Please consider this for inclusion.
http://drupal.org/node/1982292
Comment #121
podarok#116 should be in another follow-up issue
Comment #122
jaxxed CreditAttribution: jaxxed commentedSome outstanding tasks that I see:
Marker Clustering / Marker Management:
These guys all re-declare the factory.marker(loc,opts) and return a "new GMarker". I can copy over the gmap_marker.js code them, but I am not sure that they are even needed. Integrated code should likely be using an obj.change('addMarker')?
Marker Loader GeoRss
markerloader_georss.sj:21:
var xml = GXml.parse(data);
markerloader_georss.sj:81:
// This sucks, but jQuery and IE don't get along here.
GDownloadUrl(feed.url, getfn(feed.markername));
Perhaps we can return to using $.ajax() now as things probably work much better. Then we won't need a GXml either ($.ajax returns JSON DOM.)
Would module op care to assign particular parts of the backport/migration as higher priority?
Comment #123
jaxxed CreditAttribution: jaxxed commented#121 => http://drupal.org/node/1982320
edit: This is about upgrading the shapes library. This patch was moved to it's own thread, which you can find at the above link.
This move was at the request of the module op, and is required as a single patch per thread is then applied to the source, marking the task closed.
Comment #124
jaxxed CreditAttribution: jaxxed commentedIs there anybody in a place to be able to test the georss markerloader code in IE?
Comment #125
jaxxed CreditAttribution: jaxxed commenteddoes anyone have a testing environment that uses a lot of shapes, and that can test a more recent shapes patch?
(we're getting close to the deadline, and the shapes library seems important to me. If we can wrap it up I can move on to the lower priority use cases, and remove the last of the gmaps v2 reliant code.)
Comment #126
dway CreditAttribution: dway commentedI have a little test environnement that does not use intensive shapes as said in http://drupal.org/node/1459606#comment-7312414
But If you have a more recent patch for 6.X, I'll test this afternoon !
Comment #127
dway CreditAttribution: dway commentedjaxxed, there is a typo in line 66 of the patch joined in #116, that must be 'nofillstyle' instead of 'fillstyle'.
Anyway, my shapes don't work with this patch. There is constructor problem, I'm investigating.
Comment #128
dway CreditAttribution: dway commentedOk I've tested my polygons with the 2.0-beta1 applying both patches from #92 and #116, and it first don't work.
I've made a patch for polygons support, and now it works, but some work has to be done about others shapes regarding styles.
Comment #130
dway CreditAttribution: dway commentedoops, sorry for the non working patch.
New patch below.
Comment #131
dway CreditAttribution: dway commentedThe new patch for taking care of shapes (at least polygons).
Comment #132
dway CreditAttribution: dway commentedComment #133
podarok#13 commited pushed to 6.x-2.x
Thanks!!!
tagged new beta http://drupal.org/node/1988320
Comment #134
dway CreditAttribution: dway commenteduh ?
That's not fixed. As I was saying in #131, there is some more to do, at least in gmap_shapes.js.
Why put this fixed ?
Comment #135
podarokre #134 good drupal.org practice - creating follow-ups for feature fixes without spamming huge issue and 78+ followers
So better close this one with fixed status and create follow-up task issue with backlink here
Comment #136
dway CreditAttribution: dway commentedOk @podarok, thx for explaining :)
Comment #137
jaxxed CreditAttribution: jaxxed commentedit looks like google will extend the v2 library usage via a wrapper. This means that it is likely that most simple use cases will still work. Nobody has any way of testing to see what will and won't work, but this reduces the priority of the v3 update and the d6 backport
Comment #138
musojon74 CreditAttribution: musojon74 commentedHmmm and there's me having pushed 6.x-2.x-dev to a live site due to thinking it'd stop working by today....
Supported directly until 19th November 2013, and with the wrapper afterwards (for an unknown amount of time).
Comment #139
miccelito CreditAttribution: miccelito commentedI did upgrade from 6.x-1.1 to 6.x-2.0-beta2.
Using GMap, and its submodule GMap Location for displaying Node Map (map/node).
The Node map is displaying but there are some problems yet..
1) Marker action setting's option "Open info window" doesn't work. Both GMap (/admin/settings/gmap) and GMap Location (/admin/settings/gmap_location) have the Marker action setting.
Firefox java console is displaying these errors:
"TypeError: marker.marker.openInfoWindowHtml is not a function
marker.marker.openInfoWindowHtml(data);"
"TypeError: currentMarker.marker.getPoint is not a function
var markerPoint = currentMarker.marker.getPoint();"
2) The error
"TypeError: currentMarker.marker.getPoint is not a function
var markerPoint = currentMarker.marker.getPoint();"
also seems to target the Ubercart Ajax Cart module.
Edit: Found out that the (gmap/js/) marker.js file is causing those errors. That file needs to be replaced with new one, otherwise the marker action setting's option "Open info window" wont work.
Comment #140
jaxxed CreditAttribution: jaxxed commentedRE: #139
I looked into the code, and the 6.x code has most of the infoWindow calls transitioned, but not all. The 7.x-2.x code has all of them transitioned. this looks to be a backporting issue.
if your /js/marker.js:116 looks like this:
The D7 code looks like this: (/js/marker.js:
As the D6 code still has the RMTCache, it should look like this:
I've attached a patch that does that. This will likely need to be moved to a different thread.
Note also:
- some bad whitespace was removed
- there was another RMT Cache mistake, where the cache is checked and then the wrong variable is written to the info window
Comment #141
JKey CreditAttribution: JKey commented#131: gmaps-upgradeGmapV3-1459606.patch queued for re-testing.
Comment #143
dway CreditAttribution: dway commentedHey, it seems that the 6.x version is still not working, and the last patch did not pass tests...
Is this module still alive ?
Comment #144
podaroklatest patch needs re-roll
Comment #145
miccelito CreditAttribution: miccelito commented@140: Confirm that the patch solves the mentioned problem
Comment #146
willeaton CreditAttribution: willeaton commentedHi, I needed to port the module to Gmaps V3 a while ago (Google said it would stop working shortly) so I updated it using some patches posted, I now see that the module has progressed well and I can revert back to the official module code. The only problem I have (before and after) is that when I set coordinates and I zoom out from the default zoom level, my custom marker seems to move slowly left. In my case I start off smack bang in the middle of the UK, then slowly move into Ireland, and eventually into the Atlantic Ocean as I zoom out. Is anyone else experiencing this or knows what is causing it?
Comment #147
willeaton CreditAttribution: willeaton commentedForget my last comment - its simply that the anchorX value needed changing.
Comment #148
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedHi all, I wondered if we could get clarification on what is left to do on this? Is there another issue that needs to be created/linked to so the D6 v2 work can finish up? I'm a little lost...
I've also got my own hacked version of 1.x that I'd like to put to rest!
Any updates or a summary would be warmly welcomed.
Comment #149
Rodeo.be CreditAttribution: Rodeo.be commentedYeah, any news on v3 for D6?
Comment #150
ea2391 CreditAttribution: ea2391 commentedSorry I was wrong.
Comment #151
philipjohn CreditAttribution: philipjohn commentedSubscribing - and wondering if this issue is likely to get resolved before the v2 API dies on 19th November?
Comment #152
dunx CreditAttribution: dunx commentedOnly just come to this and as said, Google Maps API V2 is deprecated in about 3 weeks.
https://developers.google.com/maps/documentation/javascript/v2/
How close is this solution for D6? I can see lots of failed tests. I just wanna draw some circles on my maps :)
Happy to help test if required.
Comment #153
joelpittet@dunx I've used this and it works fairly well, give 6.x-2.x-dev a try and if you find a bug, search & report it.
Comment #154
Markiz CreditAttribution: Markiz commentedThank You. I updated to version 6.x-2.x-dev and the map in api version 3 works. Does anyone know, how to turn street view button on?
Comment #154.0
Markiz CreditAttribution: Markiz commentedUpdated issue summary. Added D6 version
Comment #155
mtoscano CreditAttribution: mtoscano commentedI also updated to version 6.x-2.x-dev and the maps load correctly, with beta5 zoom control disappear.
One question: the map style it is still the old one, not the new with lighter colours, why?
Comment #156
Summit CreditAttribution: Summit commentedGoogle Maps API v2 and with this Drupal Gmap 6.1 will be depreciated. Please does Drupal Gmap 6.2.dev works correctly?
Is there somewhere a correct upgrade scenario including upgrading from v2 to v3?
Thanks a lot in advance for your reply or link to a correct working scenario. I use Martin Pearman's ClusterMarker for showing clustermarkers on one map, is this still supported?
Greetings, Martijn
Comment #157
Summit CreditAttribution: Summit commentedHi,
I need Gmap with views.
Please confirm that Gmap 6.2.dev is Google Maps API V3 compatible?
I have it working now, adding third party .js files.
Next to this I needed a clustermarker, and this one worked: https://drupal.org/node/1573062
Greetings, Martijn
Comment #158
izmeez CreditAttribution: izmeez commented@Summit can you further clarify,
Did it not work until you changed some .js files ?
Or were you also trying to add other third party .js files and now have that working.
More details would be helpful. Thanks.
Comment #159
Summit CreditAttribution: Summit commentedHi,
I use gmap latest 2.dev and location latest 3.dev with views. Indeed it did not work without changing some .js files.
I had it working after adding first the old 6.1 third party files. All sort of .js files. And after this changing markerclusterer_packed.js to http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermana... and using that market manager (GMaps Utility Library MarkerClusterer) I got it working.
I wanted Martin Pearman's ClusterMarker, but that .js and also other ones I found on the internet didn't work.
I also added the API code in Gmap settings.
Is it now Google Api V3?
The only thing what not working is the infobubble..
Any one having the same experience?
Greetings, Martijn
Comment #160
scott_earnest CreditAttribution: scott_earnest commentedI cannot get the infoWindows to open up in my gmap views either.
Comment #161
scott_earnest CreditAttribution: scott_earnest commented...
Comment #162
scott_earnest CreditAttribution: scott_earnest commented...
Comment #163
heacu CreditAttribution: heacu commentedi am not getting my info bubble showing up either, with a gmap style view.
Comment #164
heacu CreditAttribution: heacu commentedupdate:
when using 6.x-1.x-dev, i had admin/settings/gmap set to "Do nothing" as the marker action.
after upgrading to 6.x-2.x-dev, i changed it to "Open info window" and am now getting the window to open.
Comment #165
Summit CreditAttribution: Summit commentedHi, And how about your post #163, about the info bubble showing?
greetings, Martijn
Comment #166
scott_earnest CreditAttribution: scott_earnest commentedWorking with #164. Thank you.
Comment #167
rooby CreditAttribution: rooby commentedThis is now a crazy, hard to follow issue of issues.
What exactly is this issue for?
Seeing as google maps v3 has been implemented but has bugs, shouldn't we now close this and stick to having a follow up issue for each bug found?
Comment #168
podarokdue to #167
closing
Feel free to open follow-up issue with possible bugs or support requests and stop post annoing messages to old fixed issue
Comment #169
izmeez CreditAttribution: izmeez commentedWell it's nice to see that Gmap 6.x-1.x sites are actually working well today with Google's wrapper for API v3. Having a site with overlays, markers, highlights and tooltips all working fine is a blessing. Especially, after having spent some time trying the upgrade path without success. Still not happy to be using an "unsupported" module but in this case the support from google came through.
Comment #170
Summit CreditAttribution: Summit commentedHi, I would love to see Gmap 6.2.x working with correct tooltips. All other things are working enough, but gmap views with tooltips not using latest Gmap 6.2.dev.
But I agree to Rooby, that new issues needs be set for these things, is this agreed?
greetings, Martijn
Comment #171
rooby CreditAttribution: rooby commented@Summit:
Yep, new issues for any problems you find.
podarok already closed this one.