Hi,
There are several plugins / extensions that customise the appearance infowindow (bubble) in a bit nicer way than what is possible with css, like extinfowindow, Elabel and Ebubble, of which the first one looks best to me.
It's easy to implement these extensions on a static html page with some standard Google maps code, but the gmap module adds a huge layer of complexity to implement it on Drupal.
So my question is what is the best way to add those kinds of plugins to the gmap module and have a nice infowindow on a Drupal site?
I have been checking out the gmap api, searching for issues or posts, but have not found any better way than hacking the gmap module js files. Is this really the only way, and if so, where to start?
Thanks,
Hans
Comment | File | Size | Author |
---|---|---|---|
#1 | map_js.js_.txt | 2.55 KB | tom_o_t |
Comments
Comment #1
tom_o_t CreditAttribution: tom_o_t commentedReally interesting question.
I'm working on a similar sort of thing for a project at the moment. I wanted to implement the 'maximize()' function for the GInfoWindow part of the Google Maps API - http://code.google.com/apis/maps/documentation/reference.html#GInfoWindow
To achieve it I had to hack two of the gmap module javascript files. It would be a pretty simple patch, but I know that right now is not a good time to be submitting patches to this module, as there are so many outstanding patches, and I've been told that bdragon is overwhelmed at the moment.
However, from a quick glance at the code in the links you gave, it seems that a lot of what's needed can be done just by adding an extra javascript file (which can be done via a custom module).
This code (attached) was inspired by Bevan's code for the Witness Hub map, and is an example of how to add a GOverlay to a map produced by the gmap module in Drupal.
So, to summarise - my advice would be to create a custom module that adds the javascript from extinfowindow to the page, whenever a map is being viewed. You'll need to change the way it refers to the map object, and hopefully the code in the attached js file will give you an idea of how to do that.
However, as you wrote, this is a pretty complex task to do in Drupal, especially without hacking/patching the gmap module.
Please write again to say how you're getting on. You can see my efforts for the Open Green Map in progress at http://greenmap.org/dev/ogm/en/greenmap/baltimore
Comment #2
hansrossel CreditAttribution: hansrossel commentedHi tom_o_t,
Thanks for your reply and advice. I will check it out and will post my solution (if I find one...).
I think the best solution is probably to implement the new class ExtInfoWindow:
http://gmaps-utility-library.googlecode.com/svn/trunk/extinfowindow/rele...
http://gmaps-utility-library.googlecode.com/svn/trunk/extinfowindow/rele...
With a nice example on http://googlemapsapi.blogspot.com/2007/12/extinfowindow-10-ajax-powered-...
Or an older approach would be using the GOverlay class: http://danmarvelo.us/older/2007/9/10/custom-info-window-for-google, which has a nice example on http://www.mrandmrssmith.com/luxury-hotels/united-states-hotels/new-york...
Hans
Comment #3
bdragon CreditAttribution: bdragon commentedI agree with the "implement extinfowindow" idea. Will look into it.
Comment #4
tom_o_t CreditAttribution: tom_o_t commentedThis would be an amazing addition to the gmap module - and I agree with the extinfowindow approach. It would provide a fairly simple way to load content into the infowindows by ajax callbacks, and supports tabs, as well as all the CSS features.
Comment #5
Summit CreditAttribution: Summit commentedSubscribing,
greetings,
Martijn
Comment #6
emackn CreditAttribution: emackn commentedDid ExtInfoWindow ever make it into gmap?
Comment #7
gggdrpl CreditAttribution: gggdrpl commentedsubscribing
Comment #8
johnlee80 CreditAttribution: johnlee80 commentedsubscribing
Comment #9
KrisBulman CreditAttribution: KrisBulman commentedsubscribing. any patches for this yet? ExtInfoWindow would be a great addition
Comment #10
baaj CreditAttribution: baaj commentedSubscribing (another vote for ExtInfoWindow )
Comment #11
dark.o CreditAttribution: dark.o commentedSubscribing (yet another vote for ExtInfoWindow )
Comment #12
KrisBulman CreditAttribution: KrisBulman commentedcan i vote twice?
Comment #13
srobert72 CreditAttribution: srobert72 commentedSubscribing
Comment #14
Vahalaman CreditAttribution: Vahalaman commentedSubscribing
Comment #15
KirstenLangholz CreditAttribution: KirstenLangholz commentedSubscribing
Comment #16
ThePiano.SG CreditAttribution: ThePiano.SG commentedsubscribe
Comment #17
kbasarab CreditAttribution: kbasarab commentedsubscribing
Comment #18
shadcn CreditAttribution: shadcn commentedSubscribing (another vote for ExtInfoWindow )
Comment #19
crosstopher CreditAttribution: crosstopher commentedYep, this would be awesome.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribing
Comment #21
SebCorbin CreditAttribution: SebCorbin commentedanother vote :)
Comment #22
shadcn CreditAttribution: shadcn commentedi think instead of everyone subscribing and +1s we should start working on this. I would be happy to set up a team on this project. anyone interested let me know.
Thanks
Comment #23
srobert72 CreditAttribution: srobert72 commentedOr try module Google Maps Tools http://drupal.org/project/gmaps
All of this is already implemented and many many more
I was obliged to change to it because lack of reactivity on GMap module.
Comment #24
Summit CreditAttribution: Summit commentedIt's not only gmap and location. Like using cck or feedapi. I can only change of gmaps also makes cck field and feeapi support.
It would be great if a team starts upgrading gmap/location!
greetings,
Martijn
Comment #25
SebCorbin CreditAttribution: SebCorbin commentedI'm in.
How about including the library and replace the line 47 of js/marker.js by
That's just a start, of course.
Comment #26
ayalon CreditAttribution: ayalon commentedThe normal info view is ugly. So I'm also subscribing.
And investigating, how to implement this feature.
Comment #27
shadcn CreditAttribution: shadcn commentedI've submitted a patch here #774078: ExtInfoWindow for GMap - Styling the info window for Google Maps. let me know if this works