X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fgmap.html;fp=httemplate%2Fsearch%2Felements%2Fgmap.html;h=422e6df0b59ee29e370caf6315997d22c7dfb0bd;hp=b7d135dd6204a8dd1cfd896e5dfb2b5ab87608cf;hb=a5242cfab7eeb5f02e9025d79eb97e077e3d1abb;hpb=00be4ba5a4ae727b18c1bd1ee61adfb97c744192 diff --git a/httemplate/search/elements/gmap.html b/httemplate/search/elements/gmap.html index b7d135dd6..422e6df0b 100644 --- a/httemplate/search/elements/gmap.html +++ b/httemplate/search/elements/gmap.html @@ -117,8 +117,24 @@ function initMap() { // then pop up an info box with the feature content info.close(); info.setPosition(feature.getGeometry().get()); - info.setContent(feature.getProperty('content')); - info.open(map); + + if ( feature.getProperty('content') ) { + info.setContent(feature.getProperty('content')); + } else { + info.setContent(''); + } + + if ( feature.getProperty('url') ) { + $.ajax({ + url: feature.getProperty('url'), + success: function(data) { + info.setContent(data); + } + }); + info.open(map); + } else { + info.open(map); + } } // snap to feature ROI if it has one