customize infowindow (bubble) with Google maps plugins / extensions

hansrossel - April 17, 2008 - 14:10
Project:GMap Module
Version:6.x-1.1-rc1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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

#1

tom_o_t - April 17, 2008 - 20:01

Really 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

AttachmentSize
map_js.js_.txt 2.55 KB

#2

hansrossel - May 17, 2008 - 10:46

Hi 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

#3

bdragon - October 27, 2008 - 16:21

I agree with the "implement extinfowindow" idea. Will look into it.

#4

tom_o_t - October 27, 2008 - 16:31

This 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.

#5

Summit - November 7, 2008 - 14:10

Subscribing,
greetings,
Martijn

#6

emackn - April 17, 2009 - 15:48

Did ExtInfoWindow ever make it into gmap?

#7

gggdrpl - May 7, 2009 - 05:33

subscribing

#8

johnlee80 - August 16, 2009 - 15:22

subscribing

#9

KrisBulman - August 25, 2009 - 13:12

subscribing. any patches for this yet? ExtInfoWindow would be a great addition

#10

baaj - August 26, 2009 - 22:47

Subscribing (another vote for ExtInfoWindow )

#11

dark.o - September 2, 2009 - 23:35

Subscribing (yet another vote for ExtInfoWindow )

#12

KrisBulman - September 3, 2009 - 00:10

can i vote twice?

#13

srobert72 - September 3, 2009 - 10:41

Subscribing

#14

Vahalaman - September 11, 2009 - 17:49

Subscribing

#15

KirstenLangholz - October 2, 2009 - 22:03
Version:5.x-1.x-dev» 6.x-1.1-rc1

Subscribing

#16

thepiano - October 7, 2009 - 13:03

subscribe

#17

kbasarab - October 20, 2009 - 16:37

subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.