If your data source contains a hyperlink, you can select a feature in Ajax viewer to display the hyperlink when displaying the relevant information of this element in the Selection Panel. However, this feature does not work in Fusion Viewer. hyperlinks are displayed in HTML code, which is not very nice:
The solution is to decode the HTML code and modify C: \ Program Files \ Autodesk Infrastructure Web Server Extension 2013 \ www \ fusion \ widgets \ SelectionPanel. in the js file, search for the renderFeature in this file, which is around 384 lines and changed to the following code:
htmlDecode:function(str){var s = "";if(str.length == 0) return "";s = str.replace(/>/g, ">");s = s.replace(/</g, "<");s = s.replace(/ /g, " ");s = s.replace(/'/g, "\'");s = s.replace(/"/g, "\"");s = s.replace(/<br>/g, "\n");return s;},renderFeature: function() {var layerIdx = this.layerList.selectedIndex;var featureIdx = this.featureList.selectedIndex;var layerObj = this.oSelection.getLayer(layerIdx);var nProperties = layerObj.getNumProperties();var aNames = layerObj.getPropertyNames();var table = document.createElement('table');var thead = document.createElement('thead');var tr = document.createElement('tr');var th = document.createElement('th');th.innerHTML = OpenLayers.i18n('attribute');tr.appendChild(th);var th = document.createElement('th');th.innerHTML = OpenLayers.i18n('value');tr.appendChild(th);thead.appendChild(tr);table.appendChild(thead);var tbody = document.createElement('tbody');table.appendChild(tbody);for (var i=0; i<nProperties; i++) {var tr = document.createElement('tr');if (i%2) {tr.className = 'oddRow';}var th = document.createElement('th');th.innerHTML = aNames[i];var td = document.createElement('td');td.innerHTML = this.htmlDecode(layerObj.getElementValue(featureIdx, i));tr.appendChild(th);tr.appendChild(td);tbody.appendChild(tr);}this.featureDiv.innerHTML = '';this.featureDiv.appendChild(table);}
Note the comma following the htmlDecode method. Finally, to make the changes take effect, you also need to change the javascript orientation in the template file html. For example, for the Slate template, change C: \ Program Files \ Autodesk Infrastructure Web Server Extension 2013 \ www \ fusion \ templates \ mapguide \ slate \ index.html.
<Script type = "text/javascript" src = ".../lib/Fusion. js"> </Script>
For debugging, refer to this blog. The above code is tested and passed in Autodesk Infrastructure Map Server 2013. It should also be applicable to MapGuide OpenSource.
In addition, this article has been published to ADN DevBlog.