diff options
Diffstat (limited to 'httemplate/search/elements/gmap.html')
-rw-r--r-- | httemplate/search/elements/gmap.html | 20 |
1 files changed, 18 insertions, 2 deletions
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 |