I am sure this must have been asked before, but i can't find anything on it.

I have a small map showing all my news items in the sidebar. Because the map is so small the popup within the map crowds the screen. Is there a way to open a shadowbox/lightbox/thickbox style popup instead of the gmap popup?

Comments

rockitdev’s picture

Looking for this functionality as well.

It's essentially a matter of add rel="shadowbox" to a link, but it appears as though since the markers are generating all through JS, i'm not certain how to add this behaviour to a marker link.

rockitdev’s picture

Ok, so here is how you can replace an infowindow with Shadowbox (same concepts would apply to most other JS modal window frameworks).

** This requires a change to one of the core GMAP JS Files **

This has only been tested with a GMAP view display. Install http://drupal.org/project/shadowbox and make sure it is working.

From the gmap module, edit js/marker.js

Replace

 if (marker.text) {
      marker.marker.openInfoWindowHtml(marker.text);
    }

With

if (marker.text) {
     Shadowbox.open({
          content: marker.text,
          player: "html",
          title: "Some Window Title",
          height: 450,
          width: 450
     });
}