featureAttributeTable: function(atts, feature) { var table = '<table cellspacing="0" cellpadding="2" style="width:100%;">'; for (var i in atts) { var alias; dojo.forEach(feature.fields, function (field) { if (field.name === i) { alias = field.alias; } }); var value = atts; var exp = new RegExp(/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/); if (exp.test(value)) { value = '<a href="' + atts + '" title="' + atts + '" target="_blank">Hyperlink</a>' } table += '<tr><td><b>' + alias + '</b></td><td>' + value + '</td></tr>'; } table += '</table>'; return table }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.