Google map api v3 no longer requires a key to function:
http://googlegeodevelopers.blogspot.com/2010/03/introducing-new-google-g...
I suppose this module needs to be amended to work with V3 as well.
Somehow with no key entered I've been able to use the displayed map to enter geolocation.
The annoying thing however is the key warning that pops up on any page where gmap module is used.
I'm using a development machine on an openvpn, so I'm not sure how to specify the address to use for generating the key.
In any case, shouldn't the key warning popup be removed, it's really annoying, a message on the resulting page would be less 'in your face'.
Comment | File | Size | Author |
---|---|---|---|
#179 | marker.zip | 1.81 KB | dotpex |
#172 | page-source-script.png | 3.95 KB | rhimes |
#172 | page-source-script-CDATA.png | 12.32 KB | rhimes |
#172 | admin-settings-gmap.png | 8.24 KB | rhimes |
#172 | user-x-edit.png | 9.26 KB | rhimes |
Comments
Comment #1
fmjrey CreditAttribution: fmjrey commentedComment #2
rizzo CreditAttribution: rizzo commentedYep I was interested to read the new gmap API as well.
Comment #3
fsirett CreditAttribution: fsirett commentedI have the self same problem and have had for over a week now. the maps all work just fine, but the error:
This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/.
appears on nearly every page since maps are quite heavily integrated into my site. Thank goodness it has not yet gone live.
As an aside, I did load the Key API and moved the key there. No change. I have also gone through the entire site to find any unmatched keys and there were none. The obvious problems ataken care of there.
I see this is rated as "normal." As I get closer to launch it is going to become quite urgent for me!
Comment #4
fsirett CreditAttribution: fsirett commentedI had this reply to the problem on the Googlemaps forums. It does work!
From: Rossko
Date: Jun 29 01:42AM -0700
Url: http://groups.google.com/group/google-maps-api/msg/9d71011d14c03d4c
> I have not been able to find the extraneous script line.
Visit
http://XXXXXX.com/map/user
Use 'view source' in your browser
Look for the fifth or so line
with invalid key, which generates your error prompt.
Remove it.
One of the problems is that you have to do this with each and every page you have a map on. I am now looking for the source of the offending code. I am assuming it is coming from the Gmap module and if I (or one of you!) find this it will make the resolution a bit easier.
Comment #5
kvoltz CreditAttribution: kvoltz commentedhey guys, I have this same issue. I can't seem to find the script causing the problem. Has anyone been able to tame this error flag?
Comment #6
rooby CreditAttribution: rooby commentedThis is a bigger issue than v3 not requiring a key.
This module is written for gmap v2 so needs to be updated to use v3.
This is potentially a large issue. I will have a look at the v3 api when I get some time and see what needs to be done. It will also require a lot of testing once we get some patches.
It needs to be done though as v2 is depreciated now that v3 is out.
If anyone has spare time to work on this a checklist of things that need changing or patches would be a great help.
Comment #7
kvoltz CreditAttribution: kvoltz commentedhmmm. I am guessing than, that there is no simple way to just step back into the v2 environment until that gets resolved?
Comment #8
rooby CreditAttribution: rooby commentedIf you are using the gmap drupal module you will be using v2 because it doesn't support v3 yet.
Just use the module as usual (including using the api key), it just won't have any of the new features that are added to v3 until the module is updated to use v3.
v2 is still supported by google, there just won't be any new features added.
Comment #9
kvoltz CreditAttribution: kvoltz commentedSure, I'm not concerned with any new features. It does what I need as is. I just need this error to quit popping up. I would be happy with a hack for now. Are there any suggestions?
Comment #10
rooby CreditAttribution: rooby commentedWhich error are you referring to?
Comment #11
kvoltz CreditAttribution: kvoltz commentedI get an error on every page that says the following:
"This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/."
Same as #3
I have been through the post referred to in #4, but this thread isn't really of any help. I can't track down any of the lines of code they are referring to.
If it were just a message, I would be less bothered, but it is a full error popup that stops the page from loading until you click "O.K."
Comment #12
rooby CreditAttribution: rooby commentedI don't see that error on my site.
A few things to check:
1. What version of the gmap drupal module are you using? 6.x-1.1 is just out so try that.
2. Try regenerating the API key.
3. Is your site available at multiple domains? The api keys will only work for a single domain and the gmap module only allows one key so that can cause problems as it will only work on one of the domains without error.
Comment #13
kvoltz CreditAttribution: kvoltz commentedAlright, here is the run-down.
I just generated a new key, and updated to the latest version. Sadly I am still getting the same errors.
While building the site, I had it located within a folder on my serverspace, so... www.foo.com/something
Everything worked perfectly initially, but as soon as I got the url - and directed it to that folder, things when awry.
So, the site is now at www.something.co.uk, but its in the exact same place (still at www.foo.com/something)
When this first happened - it was obvious, I needed a new key because the original one was for www.foo.com/something and the new address is www.something.co.uk. I then grabbed the new key, but no dice. I keep getting the same errors, for each page.
i have regenerated the key a half-a-dozen times now, and still no luck. Does that make any sense?
Thanks again for helping out - I'm sorry to keep banging on about this!
Comment #14
kvoltz CreditAttribution: kvoltz commentedGot it. Apologies. I am a bit of an idiot.
I had a couple other modules enabled that were also using the API key. I changed one of them, but neglected to change the rest.
Sorry to suck up so much bandwidth!
Comment #15
jrb207 CreditAttribution: jrb207 commentedGmap API 2 doesn't work with touch screen devices like the iPhone and the iPad. Gmap API 3 does. Is there other interest to upgrade the Gmap Module to API v3? I can't seem to find much discussion of it.
Comment #16
fmjrey CreditAttribution: fmjrey commentedMy interest are very simple:
Comment #17
NewZeal CreditAttribution: NewZeal commentedI had a similar problem in that I have just installed gmap location on a site and of course the link to the API key goes to the new V3 page. Eventually I found this: http://code.google.com/apis/maps/documentation/javascript/v2/reference.html and on the left is the link to the API key page. You need to be logged in for that link to work. Click on that and you go to the old API Key generation page.
My suggestion in the short term is to change the link in the module so that is goes to the url above. Provided you put in a valid V2 key then the annoying API key message disappears. You've got plenty of time to update the gmap module to V3.
Comment #18
rooby CreditAttribution: rooby commentedRe #17:
Yeah, the link needs to be updated to be http://code.google.com/apis/maps/signup.html
Comment #19
vlooivlerke CreditAttribution: vlooivlerke commentedI think it happned today. All my sites, (over 100) suddenly states " Javascript is required to view this map"
I have not worked on them and they are now broken.
Did google make V2 absolute according to there message on the API page
Note: The Google Maps Javascript API Version 3 documented within these pages is now the official Javascript API. Version 2 of this API has been officially deprecated as per our deprecation policy. We encourage you to migrate your code to this newly updated and enhanced version!
Comment #20
rooby CreditAttribution: rooby commented@VlooiVlerke:
" Javascript is required to view this map" would not be caused by this.
You have some other issue.
V2 of the api can still be used but won't have any new features.
On this page - http://code.google.com/apis/maps/documentation/javascript/v2/
They say
Comment #21
nahomadis CreditAttribution: nahomadis commentedIt would be great if someone capable took the bold move and updated the Gmap module to integrate with Google Maps API V3. I'm just such a PHP novice I don't have the ability to do it.
Comment #22
erikwebb CreditAttribution: erikwebb commentedI would be interested in helping to port this to the new API v3. Could the maintainers please create a 6.x-2.x branch for me (and others) to work off of?
Comment #23
rooby CreditAttribution: rooby commentedWhy not just make patches against the current version for now?
Otherwise it's just another version we have to maintain for a module that is already behind on maintenance.
Also, I haven't looked into it yet but depending on the scope of the changes between the two versions there might not be any need to create a new branch for this. Unless it is going to be greatly different.
Comment #24
erikwebb CreditAttribution: erikwebb commentedTo me at least, this doesn't seem like something that should be done within a major-release. To be honest, I guess it depends on how much of a rewrite it'll require. If the changes are restricted to new API calls and maybe different data objects being passed, I agree with you.
I've recently been working with the Twitter module, which required a lot of changes to work with the new API over there. Just assumed the changes would be just as big here.
I'll start taking a look at what needs to be done to convert this. Off hand, do you know if anyone else is working on an API v3 version currently? If so, I'd like to collaborate.
Comment #25
rooby CreditAttribution: rooby commentedYeah, generally I would expect to see a new major release with a new major version of an external library but compared to the size of the module I think (and hope) the code changes might be fairly small, though I'll have a better idea after looking deeper into the new version. I might be very wrong.
Also from the users point of view the settings and differences shouldn't really be noticeable, aside from the lack of API key, which will be awesome.
No, I'm not aware of anyone else doing work on this at the moment.
I'm happy to review any patches anyone can make.
Comment #26
erikwebb CreditAttribution: erikwebb commentedAs I'm working through this, should we support v2 and v3 or just v3? I'll need to move my changes around to be a more "pluggable" choice.
I'm finding a lot of functionality differences and renamed properties between the two versions, so I doubt they can fully co-exist.
Comment #27
erikwebb CreditAttribution: erikwebb commentedI'll be updating this thread with my mega-patch as I go along so we can track changes if I break something along the way.
Massive patch attached (~750 lines). I've rearranged some of the code based on what I considered a "bootstrap_option". In v3, all options should be set when the map is created, so I plan to move all functionality into that event. Any objections?
So far, functionality converted over -
-Basic map setup
-Default size/coords/zoom
-Default map type
-Control type
-Navigation control type
-Removed API key field
Functionality left to implement/test -
-Line/polygon default size
-Highlight color
-Limit available map types
-Map behavior flags
-Marker actions
-Marker managers
Comment #28
ehikr CreditAttribution: ehikr commentedsubscribing
Comment #29
rooby CreditAttribution: rooby commentedThanks for the patch.
I haven't had time to look at it yet but re #26 I would think just support v3.
Once there is v3 support there should be no need for people to use v2.
Comment #30
erikwebb CreditAttribution: erikwebb commentedMy only fear with supporting v3 only is if there are applications out there making specific use of v2 APIs. If they would need a patch, how would that work?
From what I've seen so far, if you've done a lot of custom work around v2, it would require a large amount of rewriting to be compatible with v3.
Comment #31
hutch CreditAttribution: hutch commentedv3 is really good in some respects but has yet to develop in others, draggable markers for instance are pretty poor. Also there are plenty of third-party apps such as the various marker managers that have AFAIK not yet been ported to v3.
Rewriting the existing gmap/location modules to handle both might prove too difficult so perhaps a new version for v3, written from scratch and with fewer but better and more integrated features might be the way forward. Both gmap and location suffer from the consequences of "creeping featuritis", too many bits added in a helter-skelter manner with little overview. The individual components are often brilliant but they all too often don't play well together, so for instance getting the marker you select for use to actually be used can be a hit-and-miss affair.
Comment #32
te-brian CreditAttribution: te-brian commentedre: #31
I tend to agree with hutch . My old V2 map implementations and custom little module hook-ins and such would not all translate to V3 (at least, not yet). I would propose that in order to make a clean move to V3, a new gmap 2.0 (or should we skip to 3.0?) branch should be started.
I see two options with this 2/3.0 branch:
My vote would be for option 2. I would prefer to see the gmap module move more in the direction of open layers/feeds/views/etc. IMO the most forward-thinking modules are ones who take a plugins/exportables/ctools approach to their APIs. Along those lines, I have attached the beginnings of a map module I have been working on internally. It depends on CTools and is based on the following basic ideas:
By no means is the module complete (Hint: Do NOT use in production) but it should give you an idea of the type of structure I envision. For my projects, I really need this type of extendability and structure, as we are constantly taking the basics and tweaking it here or there.
I love everything that has gone into the gmap module and would much prefer to expend my efforts on a widely used module. However, going forward and into D7, I think it could benefit from a refresh.
Just my 2 cents :)
Comment #33
hutch CreditAttribution: hutch commentedI'll have a look at map.zip ASAP ;-)
Comment #34
te-brian CreditAttribution: te-brian commentedJust attaching an updated map.zip. The version uploaded in #32 had a few bugs.
Comment #35
izmeez CreditAttribution: izmeez commentedsubscribing
Comment #36
jdidelet CreditAttribution: jdidelet commented+1
Comment #37
erikwebb CreditAttribution: erikwebb commentedLooks like there are better options than my direct API port idea.
Comment #38
te-brian CreditAttribution: te-brian commented@erikwebb - I wouldn't write it off so quickly. My particular needs may not match up with the general gmap user base. In fact, maybe most people just want a quick port.
Comment #39
csuggs4 CreditAttribution: csuggs4 commented+1
Comment #40
Magnus CreditAttribution: Magnus commentedSubscribe
Comment #41
pacome CreditAttribution: pacome commentedSubscribe
Once it will be updated to V3, we should be able to use the Google Maps API Styled Map Wizard, right ?
(here : http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index...)
If yes, that's super great ! :)
-p-
Comment #42
fabianderijksubscribe
I also want to use the v3 api, you can do some cool stuff with it.
Comment #43
rooby CreditAttribution: rooby commentedStill haven't had time to review the patches here but it definitely seems like we should keep 6.x-1.x & 7.x-1.x for maps api v2 and use 6.x-2.x & 7.x-2.x for maps api v3.
That will give us more liberty to rewrite things for v3 instead of just mashing it into the current code.
Then we can just do a direct port of 6.x-1.x to d7 so it is available sooner, then take as much time as required to do the api v3 branch.
Comment #44
hutch CreditAttribution: hutch commentedrooby's comments in #43 strike me as a clear definition of the way forward, v3 still has some issues, eg movable markers for one.
Comment #45
erikwebb CreditAttribution: erikwebb commentedI think as v3 evolves, we need a GMap version that is in-line and can grow. I think a limited functionality 6.x-2.x (maybe not even listed as recommended yet) is the proper short-term solution.
I don't feel comfortable helping with a rewrite, primarily because of my lack of JavaScript skills. Releasing a "ported" v3 version, then re-writing within the same branch seems like bad practice. I think this is the best way to go, so if I can help much on the PHP/Drupal site, I'll look to help.
Comment #46
te-brian CreditAttribution: te-brian commentedRE #43 and #45
I think this is an excellent idea. A three-prong approach could be taken:
The difficulty will be making sure people understand the differences and also realize that everything that is possible with v2 has not been implemented in v3 yet. They are, in fact, completely different APIs.
Comment #47
rooby CreditAttribution: rooby commentedI'm not sure I understand the need for two v3 branches.
I would think it would be less confusing if there is one branch for each and v3 brach isn't recommended until it is up to scratch. And have a notice on the homepage stating that the 2x branch is still under construction and not feature complete.
It would also be easier for anyone developing/testing/committing patches to have less different branches.
Having two new branches under construction spreads peoples time thinner than it already is.
It would be good to get bdragon's opinion on this too.
Comment #48
haopei CreditAttribution: haopei commentedSubscribing.
Comment #49
fith CreditAttribution: fith commentedSubscribing.
Comment #50
viren.ratan CreditAttribution: viren.ratan commentedSubscribing
Comment #51
lebodyguard CreditAttribution: lebodyguard commentedSubscribing
Comment #52
geoill CreditAttribution: geoill commentedI am very interested in utilizing the new Google maps 3.
Comment #53
EgbertB CreditAttribution: EgbertB commentedSubscribing
Comment #54
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribing
Comment #55
FiNeX CreditAttribution: FiNeX commentedsubscribe
Comment #56
EvanDonovan CreditAttribution: EvanDonovan commentedI agree with rooby in #47 - there should just be a v3 branch, and it won't be recommended until the issues are sorted. That shouldn't take longer than the "deprecation period" anyway.
Otherwise that is a lot of branches to maintain, especially considering the need for concurrent 6.x and 7.x...although maybe Git would make it easier?
Comment #57
circuscowboy CreditAttribution: circuscowboy commentedWell it seems that a new branch should be made so that development can at least start. I can lead a the new update but I can help.
Scott
Comment #58
Anonymous (not verified) CreditAttribution: Anonymous commentedGood news, Thank you circusboy.
Comment #59
hutch CreditAttribution: hutch commentedThe bulk of the changes will be in the javascript plus any php controlling code. One of the harder things to replace will be the markermanager I imagine, I see nothing comparable in Googlemaps API v3.
At a quick look gmap.js seems to be where the maps are generated so it will have to be rejigged as gmap2 functions like addControl, setCenter and setMapType have gone and the settings will have to be fed into the map options when the map is created and not afterwards. Hopefully the essential structure of gmap.js will be retained.
Anyway, a good start would be 2.x-dev branch(es).
My two bits worth.
Comment #60
EvanDonovan CreditAttribution: EvanDonovan commented@hutch: Yes, sorry, when I said v3 branch, I meant a 2.x branch of the module that uses v3. (Too much confusion possible between branch version # and the version # of the API.)
There is no markermanager in v3? Even if not native, is there maybe a third-party library? That could be recommended/required then and added using Libraries API.
Comment #61
hutch CreditAttribution: hutch commented@EvanDonovan, I haven't found a markermanager anywhere yet for v3, perhaps there is one somewhere or it's a good project for "Summer of Code" ;-)
I converted the v2 code in my Getdirections module to v3 but that code is *much* simpler than gmap, it might help to eyeball the js to get some idea of where the changes will lie.
Comment #62
boran CreditAttribution: boran commentedI just tried to use Gmap 7.x-1.x-dev and cannot get an API key accepted on admin/config/services/gmap.
The key being generated on http://code.google.com/apis/maps/signup.html.
Have I misunderstood or is gmap broken since google published v3 last year?
Comment #63
EvanDonovan CreditAttribution: EvanDonovan commented@boran: GMap is not broken. I would imagine you are having an issue with misconfiguration on your end.
Comment #64
mry4n CreditAttribution: mry4n commentedSubscribing
Comment #65
youngelpaso CreditAttribution: youngelpaso commentedSubscribe
Comment #66
navarrete CreditAttribution: navarrete commented+1
Comment #67
pjcdawkins CreditAttribution: pjcdawkins commentedSubscribing
Comment #68
matjam CreditAttribution: matjam commentedSubscribing
Comment #69
Fidelix CreditAttribution: Fidelix commentedSubscribing...
Comment #70
Beanjammin CreditAttribution: Beanjammin commented+1
Comment #71
DeeZone CreditAttribution: DeeZone commentedSubscribing
Comment #72
RedTop CreditAttribution: RedTop commentedsubscribing
Comment #73
brunorios1 CreditAttribution: brunorios1 commentedsubscribing
Comment #74
MXTsubscribing
Comment #75
khaled.zaidan CreditAttribution: khaled.zaidan commentedsubscribing
Comment #76
memoo CreditAttribution: memoo commentedsubscribe
Comment #77
RedTop CreditAttribution: RedTop commentedsub
Comment #78
onewomanbiz CreditAttribution: onewomanbiz commentedsubscribe
Comment #79
bertboerland CreditAttribution: bertboerland commentedNote this would also make it possible to use Google Maps on a HTTPS site without warnings and without buying the 10k Premium version. http://code.google.com/apis/maps/faq.html#ssl
Comment #80
HnLn CreditAttribution: HnLn commentedsub
Comment #81
stefano73 CreditAttribution: stefano73 commentedAttached file is API V3 porting for current 6.x-1.x-dev.
Needs some more work on in macro builder (marker placement and align).
Comment #82
nikkilabrum CreditAttribution: nikkilabrum commentedsubscribing
Comment #83
good_man CreditAttribution: good_man commentedsubscribe
Comment #84
Anonymous (not verified) CreditAttribution: Anonymous commentedHere's a v3 marker manager:
http://google-maps-utility-library-v3.googlecode.com/svn-history/r88/tru...
Comment #85
stefano73 CreditAttribution: stefano73 commentedLatest updates:
- added insert/remove for markers in the Macro Builder
- fixed location pick in node edit form.
Comment #86
stefano73 CreditAttribution: stefano73 commentedLatest updates:
- fixed marker icon properties;
- added marker shadow.
Comment #87
hutch CreditAttribution: hutch commentedGMap Module could do with 6.x-2.x-dev and 7.x-2.x-dev as a repo for v3 changes, would the maintainers please consider this, as suggested in #43
Google maps API V3 is maturing rapidly and Gmap needs to catch up.
Comment #88
EvanDonovan CreditAttribution: EvanDonovan commentedTill that happens, you could use a sandbox potentially. I think you can have multiple contributors (and an issue queue), and then you can just update this issue with your progress.
Comment #89
kugta CreditAttribution: kugta commentedSubscribe
Comment #90
hutch CreditAttribution: hutch commentedI have recently released a new module, Get locations which contains code borrowed from Gmap, in particular the marker code in gmap_markerinfo.inc and icons.js.
These have been adapted to use Google API v3 along with the marker ini files and could be ported back to Gmap once there is a branch to port them to.
Comment #91
jasongrimes CreditAttribution: jasongrimes commentedSubscribe
Comment #92
arija CreditAttribution: arija commentedSubscribe
Comment #93
heshanlksub
Comment #94
jkirk CreditAttribution: jkirk commentedSubscribe
Comment #95
arcane CreditAttribution: arcane commentedSubscribe
Comment #96
andrea.brogi CreditAttribution: andrea.brogi commentedsubscribe
Comment #97
boran CreditAttribution: boran commentedno more "subscribes" please, use the follow button on the top right :-)
Comment #98
wxman CreditAttribution: wxman commentedDoes the patch in #86 work with this patch: http://drupal.org/node/429330#comment-4342992 ?
I gave it a try, and I'm getting the "Javascript is required to view this map." on every place there's a map.
FIXED:
Never mind. I was able to get both to work. It only took a minor change in the HTTPS patch. Now version 3 and HTTPS are both working. Thanks for the API 3 version.
Comment #99
arcane CreditAttribution: arcane commentedCould you let us know what you did to get everything working?
Comment #100
healycn CreditAttribution: healycn commentedSubscribing
Comment #101
wizonesolutionsDon't subscribe with comments anymore; use the green Follow button at the top-right of the issue.
Comment #102
mtchetch CreditAttribution: mtchetch commentedNo info Windows? No problem :)
To get gmap V3 to play nice with views and clickable markers (that show the info window) I changed the file marker.js.
The changes enable the marker to be clicked and the info window to be created on click. Only one window at a time, previous windows get closed when you click a marker.
Just replace the gmap/js/marker.js found in comment #86 package and you get basic info window functionality.
Come on, join in and lets get Gmap fully working with the V3 Api
Comment #103
wxman CreditAttribution: wxman commentedSorry, I can't make a proper patch. I can attach the fixed gmap.module file. This is the API 3 version with http://drupal.org/node/429330#comment-4342992 applied. I had made a slight change in the patch, but being the fool I am, I forgot to document my fix.
Comment #104
ionut.stan CreditAttribution: ionut.stan commentedSolution #86 works perfectly! Congratulations!
Comment #105
arcane CreditAttribution: arcane commentedUsing #103, I had to comment out lines 1322 to 1329 because I was getting an Fatal error: Cannot redeclare template_preprocess_gmap_view_gmap() since it was already declared in gmap.views.inc
The code that was commented out is shown below:
Comment #106
spgd01 CreditAttribution: spgd01 commentedsubscribe
Comment #107
oren102 CreditAttribution: oren102 commentedWith a little modification to #86, I was successful with complete https switchover.
All I did was change the "http" to "https" in the "/sites/all/modules/gmap/gmap.module" file.
Thanks a lot!
Comment #108
allukraine CreditAttribution: allukraine commentedWhy has stopped the development of the project? Should I expect not beta version for Drupal 7?
Comment #109
ipwa CreditAttribution: ipwa commentedI think we should start testing out #86 and reporting back here. If a couple of more people test it too, I can do a diff patch so we can mark the issue as "needs review" for the maintainers attention.
Comment #110
SeanA CreditAttribution: SeanA commentedRestoring version.
Comment #111
allukraine CreditAttribution: allukraine commentedIf "gmap_v3_1.zip contains versions of modules or themes that are not compatible with Drupal 7.x: GMap Taxonomy Markers, GMap, GMap Macro Builder, GMap Location" - in this case, it can be checked with Drupal-7?
Comment #112
izmeez CreditAttribution: izmeez commented@ipwa, a patch would allow more review and testing. Thanks.
Comment #113
SeanA CreditAttribution: SeanA commented@allukraine, the code in question is for Drupal 6, therefore the code posted here is not compatible with Drupal 7. Changing the version will not make development move faster if there is no D7 code yet for this. Please leave the version at 6.x while work is being done in this issue to get these fixes into the D6 version of the module. (If you need this for D7 right away, best option is to hire a programmer to implement it for you and contribute the code back to the module.)
Comment #114
dafederFolks, to speed this along I've created a patch from #86 - haven't done any testing myself yet.
Comment #115
dafederFirst observation: autozoom does not seem to work.
Comment #116
dafederHere's a new patch to fix autozoom. Assumes that #114 is already applied.
Comment #117
dafederSorry, some cleanup I forgot to do in that last patch. Doesn't have any ill-effects but this one is cleaner.
Comment #118
dafederInfo windows are still using all the old V1 methods, so those aren't going to work unless we rewrite all of that.
EDIT Sorry, missed #102. I'm going to put this all together into a single patch.
Comment #119
dafederHere is a new patch combining #86 and #102. #103 seems to be quite broken to me so I did not include it.
Comment #120
dafederUgh, I really do apologize folks, posted too quickly again. Please use this one.
Comment #121
greggmarshalldafeder
What should I apply this patch against? I tried it against the latest 6.x git repository and got a whole bunch of git errors...
Comment #122
hutch CreditAttribution: hutch commentedI just tried this (on ubuntu box):
git clone --branch 6.x-1.x http://git.drupal.org/project/gmap.git
cd gmap
wget http://drupal.org/files/gmap_apiv3_autozoom_infowindow-818638-120.patch
patch -p1 < gmap_apiv3_autozoom_infowindow-818638-120.patch
The output was
Looks OK to me.
Comment #123
dafederPatch was against latest 6.x-1.x-dev release. Perhaps you're still on 6.x-1.1?
Comment #124
eMuse_be CreditAttribution: eMuse_be commentedSubscribing
Comment #125
izmeez CreditAttribution: izmeez commented@dafeder, patch in #120 applies to gmap-6.x-1.x-dev and appears to be working. Will need to do more testing to confirm if it also works with gmap_addons or if that module will need changes to match.
Comment #126
izmeez CreditAttribution: izmeez commentedJust wondering with the advancement of the patch for 6.x to use api3 if it's time to make a commitment to a new branch? Personally I think it would make sense to jump to 6.x-3.x-dev for the new branch.
Comment #127
SeanA CreditAttribution: SeanA commented@dutchiexl, please don't change the version: the code here is for D6. (Subscribe comments are no longer necessary, you can click the "Follow" button instead.)
Comment #128
haiiro.shimeji CreditAttribution: haiiro.shimeji commentedI made the patch code for D7.
http://drupal.org/node/1459606
The followers who use D7, please review this code.
Comment #129
leewoodman CreditAttribution: leewoodman commentedsubscribing
Comment #130
nairb CreditAttribution: nairb commentedComment #131
vlooivlerke CreditAttribution: vlooivlerke commentedHow about a download link for us lazy people who just want to untar, play and comment.
D6 please. My patching skills suck
Comment #132
aasarava CreditAttribution: aasarava commentedPatch in #120 applied to the current 6.x-dev works for me. Thanks! It might be worth adding optional support for keys back in, though, for users who have purchases a license to serve more than 2500 map requests per day.
Comment #133
rooby CreditAttribution: rooby commentedAgreed, it needs to support the business key.
Although the limit for the free service is actually 25000 a day.
Comment #134
Pls CreditAttribution: Pls commenteddafeder, you've done amazing work. Thanks for that. We really appreciate it.
Attached tar file with current gmap 6.x-1.x and applied patch from #120. Please test and report back. For me it works without any problems. Thanks!
Comment #135
sano CreditAttribution: sano commentedThank you Pls. The only problem I see so far is that the module you prepared is not showing version number on the module list page. This is a small price to pay for the convenience though :-)
Comment #136
rooby CreditAttribution: rooby commentedIf it has been checked out from git it doesn't have a version number as it isn't a specific version.
It is just the latest code as of when it was checked out.
You can add a version yourself to the info file so you know.
Just add a line to the info file like
version = "6.x-1.x-dev"
You could include a date in the version number to make it more useful.
Or include an extra line in the file:
datestamp = "1301616521"
With the current unix time stamp.
You can get a timestamp from http://www.epochconverter.com/
Comment #137
guero_jc CreditAttribution: guero_jc commentedHi guys, received a cordial greetings from Guadalajara Mexico. I did what you said about the patch, install the module as an upgrade from V2 to V3 API and mapping work and even in the views, but the problem I encountered is that clicking on a globe of information, not displays any action (such as: Do nothing, Show information, Open link to the node), including enabling or disabling the module administration page.
I hope to see my comment and try to update this function module.
I think do an excellent job
THANKS
Comment #138
guero_jc CreditAttribution: guero_jc commentedHi guys, again with some news about the update that made the gmap module.
In the section "Gmap macro creation" does not work any action in the section "Overlay editor," there before, you could create filled polygons, lines, circles, or dots, but nothing works. Do not think it's limiting V3 google maps api. I pass the data from this, since it is a very important function in gmap. I do not program in php, but I was looking at the code, and if I notice some changes, I believe that there may be the problem.
Thanks
Comment #139
guero_jc CreditAttribution: guero_jc commentedHi guys, and follow the news on the update to the gmap module.
In the V2 API, you could create filled polygons, and when the node accedias, I showed the map with the polygon fill, now it does not, check in paragraph format types, and is correct and select the "Gmap macro expander. "
Thanks
Comment #140
vlooivlerke CreditAttribution: vlooivlerke commentedhi, I cant get my taxonomy markers to work.
Cleared all caches and regenerated makers did update but no markers in views.
Comment #141
pepe84 CreditAttribution: pepe84 commentedI have the same issue #137
Comment #142
truyenle CreditAttribution: truyenle commentedpatch from #120 and instruction from #122 works for me with 6.x-1.x-dev. However, there is an issue with location module.
I use location with gmap. Location help to pick up location by enable "Use a Google Map to set latitude and longitude" under Location module.
The map for pickup location look weird see image. If I drag and drop the map, seems doesn't work.
I'm not sure this is the issue of Gmap or Location, properly the location. I'll shoot this to location module issue queue also.
Thanks
Update: the issue is reported here in location module http://drupal.org/node/1509900
Comment #143
pepe84 CreditAttribution: pepe84 commented@guero_jc have you tried to enable the marker action? This issue has been driving me crazy for 2 days and it results that I forgot to enable it at gmap location module settings page (/admin/settings/gmap_location). :S
Marker action:
[ ] Do nothing
[X] Open info window
[ ] Open link
Perform this action when a marker is clicked.
Cheers,
Pepe
Comment #144
guero_jc CreditAttribution: guero_jc commentedHi pepe, yes, I've tried setting the action, but does not work quite right. Everything is configured correctly, but still, not working "overlay editor" when you create a gmap macro.
Thanks and regards
Comment #145
asiby CreditAttribution: asiby commentedOYE OYE ... I HAVE FOUND THE WAY TO GENERATE AN API KEY FOR THE GOOGLE MAP API v2
Guys, I am sorry to burst your bubble but you are not hallucinating. It is indeed still possible to get an API Key for the Google API v2. I will try to keep the explanation brief and concise.
These steps worked for me. I sincerely hope they will for you.
Depending on the lifespan of your project, the date mentioned in the Google's deprecation policy might give you some breathing room all some extra time while the module is being migrated to the API v3.
Good luck guys.
Asiby
Comment #146
webservant316 CreditAttribution: webservant316 commentedI wish I was having the same success.
I also had found the https://code.google.com/apis/console and added the map v2 service and generated a key for my new install of gmap. It was working yesterday, but quit working today.
I checked all my settings and generated a new key but got this message "Status: Active until Apr 27, 2012 6:32 AM" Not cool. One day of service!?!?Sorry that status applied to the deleted obsolete key replaced by my new key. Though this problem continued... Furthermore when I installed the key in http://mywebsite.com/admin/settings/gmap it appeared to be accepted. However, when I hit a page displaying a map I get this error...Wow what is up?
Jeff
Comment #147
webservant316 CreditAttribution: webservant316 commentedThis article seems relevant about a missining 'sensor' parameter which my gmap install does not seem to have either http://groups.google.com/group/google-maps-api/browse_thread/thread/a7f1....
I know that this post is far off the issue title topic. But the larger issue under discussion here seems to be how to get this module to work with google map versions and keys. Shall I start a new thread?
Comment #148
webservant316 CreditAttribution: webservant316 commentedok my problem explained & solved here - http://drupal.org/node/1549272
Comment #149
carlodimartino CreditAttribution: carlodimartino commentedThis is not working for me any more from today. The Google warning pops up after 5 seconds or so and the map disappears. I've generated new keys but same problem.
Comment #150
radoya CreditAttribution: radoya commentedI had same issue today. I find that I didn't correctly set refer sites. I had something like this:
sitename.com
sitename.com/*
As I change it to way sugested from google like this:
*.sitename.com
*.sitename.com/*
Everything apear fine.
I left it in this way for any case:
sitename.com
sitename.com/*
www.sitename.com
www.sitename.com/*
*.sitename.com
*.sitename.com/*
and it saved an issue and maps now apear as expected withouth prompt.
Comment #151
Scrat000 CreditAttribution: Scrat000 commentedThanks, this solution worked for me!
Comment #152
carlodimartino CreditAttribution: carlodimartino commentedThanks, this solution worked for me too!
Comment #154
asiby CreditAttribution: asiby commented#145 works. I did it over 5 times while writing the instruction to make sure that I explained it properly.
Comment #155
sioux CreditAttribution: sioux commented#145 alone was not enough, I edited it as #150 shows, and it took care of it.
Comment #156
ChrisValentine CreditAttribution: ChrisValentine commentedMy map was working OK but someone abroad reported the JavaScript failure popup thinking it was a Firefox 12 issue. I changed the domain entries as suggested in #150 and it stopped working on my machine too (Firefox 11 or Chrome), with Drupal reporting that "
Key for 'google_maps' @ '[my domain and page]' doesn't exist.
"I'm using:
However, if I only put the one domain in to Keys (without www) - in contradiction to #150 it starts working again. So it looks like it might be a bug in the Keys module.
Comment #157
sithu89 CreditAttribution: sithu89 commentedThank ,...
Comment #159
rajendra333 CreditAttribution: rajendra333 commented# 86 gmap_v3.zip working fine i have used.
Comment #160
rajendra333 CreditAttribution: rajendra333 commentedthank for your code because gmap module not support v3 version
Comment #161
SeanA CreditAttribution: SeanA commentedCode in this thread is for 6.x version.
Comment #162
Gastonia CreditAttribution: Gastonia commentedIt's two years today that I have been a part of this thread. Just curious, would it not be more advantageous for us to work together to write a new module from scratch? By the time 6 is ready, D8 will be out. An attempt to patch D7 after this would put this module basically obsolete :/
Location + Gmap is a huge part of my architecture for my clients. I am very sad to see the words 'Legacy module' applied to the description of Gmap.
I am very willing to help with a new architecture if there is one underway. If there is not, how about lets get one started? Preferably D7. Sorry for the slight tangent. With our heads together as a community surely we can breathe new life into this current Frankenstein.
Comment #163
ipwa CreditAttribution: ipwa commentedI used to be a big fan of this module but now I use OpenLayers in which you can use gmaps (v3 interface) too.
I know there is some development of the Location module for 7.x, but there is a lot of good stuff that works well already out there.
Geofield is a good module that works very well. It gives you a geolocation field, that allows for multiple ways to input the location. I think fields is the best approach (that's something that always bugged me about the Location moduke), just look at what happenned to Taxonomy in D7. One of the ways to input the data is by adding a point to a map, there are also a variety of ways to display that data including a map. The module doesn't have map support (I think other than HTML5) by itself, but it works well with OpenLayers and Staticmap (for simple maps).
I guess what I'm trying to say, that there isn't a whole lot of value on porting this module to D7. There are already solutions that will work with Location on the future for example (Staticmap), that provides Gmaps among other map providers.
For simple Location+Gmap replacement use Geofield + Staticmap.
Comment #164
2phaI too have moved on from this module, usually using geofield with openlayers. Though I have started just using the google maps api to make the map myself as it is so easy to use.
Comment #165
webservant316 CreditAttribution: webservant316 commentedCan Geofield and/or Static map provide both a single marker on a node map and multiple markers on a Views oriented map? Currently I use gmap to put a single marker on a map on a node and then use Views to put multiple markers from those nodes on a single map.
Comment #166
ipwa CreditAttribution: ipwa commentedThe reason I don't do this is because then I don't get the geolocation stored on my Drupal nodes, which is cool, and can be taken advantage of by Google (showing results on map searches).
Not entirely sure if Staticmap supports Views yet, with OpenLayers though, I have done what you describe many times.
Comment #167
2phaThat is what geofield is for.
Comment #168
donpwinston CreditAttribution: donpwinston commentedUnreal. What the heck is going on?
I'm an unable to generate a valid api key. I've done it before two or three times about 8 months ago. What's changed?
Comment #169
ChrisValentine CreditAttribution: ChrisValentine commentedI'm getting random reports from my users that the embedded map doesn't appear and they see an API error - while for other users its working fine. Days later, without having done anything, its working again. I can only guess its Google fiddling with the v2 API - perhaps encouraging us to migrate to v3!
Would like to see a working, stable, API v3 solution to geolocation and mapping for Drupal 6.
Comment #170
matiaslezin CreditAttribution: matiaslezin commented#150 worked for me!
Comment #171
AtomicCharles CreditAttribution: AtomicCharles commented#150 seems to be the accepted solution (and it works for me)
Comment #172
rhimes CreditAttribution: rhimes commentedHas anyone successfully used this patch (#120) for Gmap Api v3 on a local test enviroment site (Xamp/Wamp setup) which had previously been using a v2 Api Key?
Wanting not to commit the patch to my production sites until I tested it locally (I use Xamp), I applied #120 patch to my local test site "newsite.loc" which had been previously generating all maps successfully with a v2 Api Key (got v2 key the "old" way for test site prior to code.google.com/apis/console method).
After applying patch, maps @ "/map/user", "/admin/settings/gmap" and "/user/X/edit" (@ "Location" fieldset, have "Use a Google Map to set latitude and longitude" enabled) no longer load, only light grey areas appear where maps had been showing - see attached screen shots.
Also attached are screenshots (2) of the page source of /maps/user showing what I believe to be the correct js script source and map data that indicates there should be two map markers on the missing map.
Comment #173
quwat CreditAttribution: quwat commented1. log in to https://code.google.com/apis/console/
2. Create New Project
3. Under Services - turn on only Google Maps API v2
4. Click on API Access link on the left side
5. Click on Create an OAuth 2.0 Cleint ID , the blue tab in the center
6. Brand your API i.e Product X (Your brand name) and your logo at
http://www.example.com/sites/default/files/logo.jpg
7. Click Next and click Web Application and leave your web address in the host name (www.example.com) and click on Create ID tab
8. Click on Create New Browser Key tab at the bottom.
9. In Accept requests from these HTTP referers (web sites) space: Put the following addresses of your web site
*.example.com
www.example.com/*
www.example.com/admin/*
1. Click create the Key tab
2. Copy your API key and Paste in http://www.example.com/admin/settings/gmap
3. Hope this works for Drupal 6
Comment #174
youngelpaso CreditAttribution: youngelpaso commentedChrisValentine, check out: https://developers.google.com/maps/faq#ssl Unless you're a Google Maps API for business user you can't get API V2 over https - this will lead to 'javascript is required to view this map' error and no map. So, for your users visiting pages over HTTPS that's probably what's happening, and those over http are probably fine. Hence the semi-randomness of their experience. I'm dealing with the same issue. Good luck!
Comment #175
ChrisValentine CreditAttribution: ChrisValentine commentedInteresting - wouldn't have thought of that!
I'm in the process of migrating the site to Drupal 7 and had replaced the GMap Module with Get Locations instead - which uses API3.
Comment #176
donpwinston CreditAttribution: donpwinston commentedWhy didn't you dump Gmaps altogether and use OpenLayers? I was able to convert everything in my project without difficulty. I was under the impression that GMaps is defunct.
Comment #177
dotpex CreditAttribution: dotpex commentedhttp://drupal.org/node/818638#comment-5771082 work for me, with replaced marker.js from d7 version.
v3 api work over https without key!!!
We use domain module and ssl per domain, this works for me.
In gmap.module add
And changed two lines
328
1118
Comment #178
merch CreditAttribution: merch commentedUsing #134 http://drupal.org/node/818638#comment-5771082
Maps working generally ok
Problems with views not having a on click state on pins.
problem with views not highlighting pin of focus.
I can live without the highlighted pin but does anyone know how to fix it so that click on pins will show view information (title image ect)
Comment #179
dotpex CreditAttribution: dotpex commentedTry with this marker.js from d7 version of module, work for me.
Comment #180
rfayGoogle has sent out emails reminding us that the formal deprecation period for v2 of the API ends in May, 2013, after which they suggest that v2 won't work at all. Time to get this in.
I have a legacy site that uses this with a view and it works fine... would rather not have to rework it.
Moving to "Critical" and "Bug report" as it's no longer a feature request but fundamental requirement.
Needs to be done for 7.x as well.
Comment #181
vlooivlerke CreditAttribution: vlooivlerke commentedHi could you please attach your working version, I have used the above supplied files but the patches that was released afterwards well some work and some don’t.
Specially taxonomy markers in views
Thanks
Comment #182
dotpex CreditAttribution: dotpex commentedI replace module with one from #134 and then replace markers.js from d7 version of module, but we don't use taxonomy markers or views for displaying data on gmap, only custom code and domain module with some domains work over https.
Comment #183
betson CreditAttribution: betson commentedHi,
I am new the drupal. My client told me the update the google map version. So I checked the site. There is a lot marking and all there. So I tried to update the V3 version with the help of this thread. Now the map is displaying . But there is no marker coming and map is not showing with the db values of lattitude and longitue. Can anybody give me full code here. Is there any change needed in any other module to show the markers and locations?
Comment #184
rooby CreditAttribution: rooby commentedComment #185
slv_ CreditAttribution: slv_ commentedI agree with rfay (http://drupal.org/node/818638#comment-6869634) in that it's got to be treated as a bug, since most of the staff in V2 (if not all) might stop working after the deprecation date. Won't change again if a maintainer thinks it's a feature request, but I'll switch the category back to bug report for now, might be easier to prioritize things.
Cheers.
Comment #186
tmsimont CreditAttribution: tmsimont commentedAs far as I can tell by reading this thread and looking at the code, api in use should be v3 for 7.x-2.x-dev, but for some reason whenever I view my maps, I get this message:
However, the map still works...
Why does this message appear if the map is supposedly using v3 api? What am I missing here?
Comment #187
Sylvain_G CreditAttribution: Sylvain_G commentedJust tried out 7.x-2.x-dev... my map is broken
No markers, no vectors, only background layer... seems far from production ready to me.
Lot's of v2 Objects in js code :(
I'm quite worried
Comment #188
tmsimont CreditAttribution: tmsimont commentedIf I omit the key in 7.x-2.x from the settings, the map works without error on v3 API, but what key does it use?
I see a lot of critical issues with this module, and a lot of users reporting here with an urgent need for v3 API, but no status updates from maintainers. There's much work to be done here but I see it's been 11 weeks since the last commit.
I looks a lot like this module is abandoned in favor of these modules:
GeoField
OpenLayers
GetLocations
But I must say it would be nice if this module still worked... Can a maintainer report any plans for this module? Has it died?
If there's still life in this module, we should really get a roadmap put together for how this will get fixed. I've changed the version to 7.x-2.x, because AFAIK the "Drupal way" of comittting fixes is to fix the latest version and then backport. I know a lot of code here is for 6.x, but this issue is also almost 3 years old.
A lot of sites are probably starting to upgrade from 6 to 7, so I think we should get a functional 7.x branch, and then if 6.x is even still supported by the time that gets worked out, we backport.
Any thoughts from those involved would be great.
Thanks
Comment #189
tmsimont CreditAttribution: tmsimont commented#1334218: Is this a gmap.module replacement
Comment #190
tmsimont CreditAttribution: tmsimont commentedi guess there's a different issue for d7:
#1459606: [CLOSED] Backport from D7 to use Google maps API V3 for D6 6.x-2.x-dev
Comment #191
magpoc CreditAttribution: magpoc commented#120 workd well for me but only when I set not to use any Marker Manager in admin/settings/gmap
If I set to use the Marker Manager, no markers will appear on my map.
Can't I use the patch with Marker Manager setting?
Anyway thanks for the effort.
Comment #192
podarokthis one duplicate of #1459606: [CLOSED] Backport from D7 to use Google maps API V3 for D6 6.x-2.x-dev
please - move Your work there
Comment #193
iancawthorne CreditAttribution: iancawthorne commentedIsn't #1459606 for Drupal 7 and this issue was for Drupal 6?
Comment #194
podarokto #193
look at #1459606-72: [CLOSED] Backport from D7 to use Google maps API V3 for D6 6.x-2.x-dev
Comment #195
vodoleq CreditAttribution: vodoleq commented#134 worked well for me but how to apply my custom Styles and change a few colors on the map from
http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index...
in which files and where to make changes?
Thanks!
Comment #196
donpwinston CreditAttribution: donpwinston commentedOpenLayers works just as well and is actually a little easier to configure. No API keys also.
Comment #197
Summit CreditAttribution: Summit commentedAm I not correct that Google V3 Api doesn't need APi Key anymore also?
Greetings, Martijn
Comment #198
tmsimont CreditAttribution: tmsimont commentedyes that's correct. it's optional. you can enter it if you want metrics.