Franz Buchinger
2010-Jun-24 08:21 UTC
[Mapstraction] Feature Proposal: Infobubble with AJAX content
Hi, in my projects I often have the need to lazy-load the infobubble content of a marker via AJAX, mostly because the content is "expensive" to fetch (requiring a few database queries) and thus can''t be loaded in advance for hundreds of markers. Unfortunately, mapstraction currently offers no "AJAX infobubble", that can be asynchronously filled with a server response. This is not mapstraction''s fault, also the Google Maps API, Bing etc don''t offer such a functionality. Any ideas on how to include such a feature in mapstraction? Maybe something like Marker.setAjaxInfoBubble(url, loadingMessage, errorMessage); kind regards, Franz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100624/a5d3a634/attachment-0001.htm>
Dylan Kuhn
2010-Jun-24 13:28 UTC
[Mapstraction] Feature Proposal: Infobubble with AJAX content
> > Any ideas on how to include such a feature in mapstraction? > > Maybe something like > > Marker.setAjaxInfoBubble(url, loadingMessage, errorMessage); > >Some of the implementations need a little modification to accommodate it (I plan to submit my changes for OpenLayers at least), but I use jQuery something like this: jQuery.get( content_url, function( content ) { marker.setInfoBubble( content ); marker.openBubble(); } ); The problem with the OpenLayers implementation was that it created the info bubble in the constructor - I''ve modified it to create a new one in openBubble. -dylan- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100624/c1737282/attachment.htm>
Derek Fowler
2010-Jul-03 16:57 UTC
[Mapstraction] Feature Proposal: Infobubble with AJAX content
You can achieve this by handling the info bubble open event. It''s certainly not something we''d build into the library as an ajax implementation is a big bit of code and devs will likely be already using a library to cater for doing this. Derek On Jun 24, 2010 2:28 PM, "Dylan Kuhn" <dylan.k.kuhn at gmail.com> wrote:> > Any ideas on how to include such a feature in mapstraction? > > Maybesomething like > > Marker.... Some of the implementations need a little modification to accommodate it (I plan to submit my changes for OpenLayers at least), but I use jQuery something like this: jQuery.get( content_url, function( content ) { marker.setInfoBubble( content ); marker.openBubble(); } ); The problem with the OpenLayers implementation was that it created the info bubble in the constructor - I''ve modified it to create a new one in openBubble. -dylan- _______________________________________________ Mapstraction mailing list Mapstraction at lists.mapstraction.com http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100703/e93ca8de/attachment.htm>