Hi, frist of all congratulations for Mapstraction.
We need do something just before bubble were shown, and of course, not
only with Google Maps. But Mapstraction only lets to set the message
bubble, without event handler, isn''t it?
Meanwhile, we have extended Marker object in order to support a
callback
function which is called just before info window was opened.
Marker.prototype.beforeOpenBubble = function(){ return false; }
[...]
// In Google Maps abstraction
_self = this;
GEvent.addListener(gmarker, event_action, function() {
theInfo = _self.beforeOpenBubble() || theInfo;
gmarker.openInfoWindowHtml(theInfo, {maxWidth: 100});
});
In this way, when the user want do something like Ajax request to show
the info returned in the marker window, its code could be
var marker = new Marker(myPoint);
marker.beforeOpenBubble = function() {
return "Data shown".
}
The value returned for callback function beforeOpenBubble is set in the
bubble. If beforeOpenBubble doesn''t return any value, theInfo is used.
--
J. Pablo Mart?n Cobos
Yaco Sistemas S.L. | http://www.yaco.es
C/ Rioja 5, 41001 Sevilla (Espa?a)
Tel?fono: (+34) 954 50 00 57 | Fax (+34) 954 50 09 29