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

Files: 
CommentFileSizeAuthor
#1 map_js.js_.txt2.55 KBtom_o_t

Comments

StatusFileSize
new2.55 KB

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

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

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

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.

Subscribing,
greetings,
Martijn

Did ExtInfoWindow ever make it into gmap?

subscribing

subscribing

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

Subscribing (another vote for ExtInfoWindow )

Subscribing (yet another vote for ExtInfoWindow )

can i vote twice?

Subscribing

Subscribing

Version:5.x-1.x-dev» 6.x-1.1-rc1

Subscribing

subscribe

subscribing

Subscribing (another vote for ExtInfoWindow )

Yep, this would be awesome.

subscribing

another vote :)

i 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

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

It'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

I'm in.

How about including the library and replace the line 47 of js/marker.js by

marker.marker.openExtInfoWindow(
  obj.map,
  "marker_info_window",
  marker.text,
);

That's just a start, of course.

The normal info view is ugly. So I'm also subscribing.

And investigating, how to implement this feature.

I've submitted a patch here #774078: ExtInfoWindow for GMap - Styling the info window for Google Maps. let me know if this works