Skip to content
Snippets Groups Projects
Commit 6fa67f4d authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Forward port missing changes from 1.1.2.4 (8/20/2008 7:40 PM):

Integrate some of bevan's mods into marker.js.
parent c5e5b943
No related branches found
No related tags found
No related merge requests found
......@@ -46,14 +46,30 @@ Drupal.gmap.addHandler('gmap', function (elem) {
// Default marker actions.
obj.bind('clickmarker', function (marker) {
// Local/stored content
if (marker.text) {
marker.marker.openInfoWindowHtml(marker.text);
}
// AJAX content
if (marker.rmt) {
$.get(obj.vars.rmtcallback + '/' + marker.rmt, {}, function (data) {
var uri = marker.rmt;
// If there was a callback, prefix that.
// (If there wasn't, marker.rmt was the FULL path.)
if (obj.vars.rmtcallback) {
uri = obj.vars.rmtcallback + '/' + marker.rmt;
}
// @Bevan: I think it makes more sense to do it in this order.
// @Bevan: I don't like your choice of variable btw, seems to me like
// @Bevan: it belongs in the map object, or at *least* somewhere in
// @Bevan: the gmap settings proper...
//if (!marker.text && Drupal.settings.loadingImage) {
// marker.marker.openInfoWindowHtml(Drupal.settings.loadingImage);
//}
$.get(uri, {}, function (data) {
marker.marker.openInfoWindowHtml(data);
});
}
// Tabbed content
else if (marker.tabs) {
var infoWinTabs = [];
for (var m in marker.tabs) {
......@@ -63,6 +79,7 @@ Drupal.gmap.addHandler('gmap', function (elem) {
}
marker.marker.openInfoWindowTabsHtml(infoWinTabs);
}
// No content -- marker is a link
else if (marker.link) {
open(marker.link, '_self');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment