laptop and a wrench

Erro

Email and URL links in the carousel for point features display as 'undefined' in the My Government Services JavaScript template.

Última Publicação: August 10, 2016 ArcGIS for Local Government
Número de ID do Erro BUG-000087527
EnviadoMay 8, 2015
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS for Local Government
Versão encontrada10.3
StatusWill Not Be Addressed

Informações Adicionais

The My Government Services (JS application) has been moved to mature support and is no longer being updated. Please use the updated My Government Services app which is using Web AppBuilder for ArcGIS, available here: http://solutions.arcgis.com/local-government/help/my-gov-services/ This issue does not exist in the newest version. Also, You will be able to configure the pop-up for phone numbers or anything. We are using the pop-up in ArcGIS Online, so it is much more flexible than the previous custom application.

Solução Provisória

See the attached carousel.js file. Lines 646 - 650 were commented out: /*if (i == 0) { tdData.innerHTML = feature[service.FieldNames[i].FieldName] + " (" + FormatDistance(distance, "miles)"); } else { tdData.innerHTML = feature[service.FieldNames[i].FieldName]; }*/ and lines 654-694 were added: if (i == 0) { tdData.innerHTML = feature[service.FieldNames[i].FieldName] + " (" + FormatDistance(distance, "miles)"); } else if (service.FieldNames[i].Links) { var tdLink = dojo.create("td"); tr.appendChild(tdLink); var tableLink = dojo.create("table"); tableLink.cellSpacing = "0"; tableLink.cellPadding = "0"; tdLink.appendChild(tableLink); var tbodyLink = dojo.create("tbody"); tableLink.appendChild(tbodyLink); var trLink = dojo.create("tr"); tbodyLink.appendChild(trLink); for (var m = 0; m < service.FieldNames[i].Links.length; m++) { // Insert separator from previous cell at end of current row if (m > 0) { var span = trLink.insertCell(-1); span.style.borderLeft = "1px solid white"; span.style.paddingRight = "5px"; } // Create cell for link var tdHref = dojo.create("td"); tdHref.style.paddingRight = "5px"; tdHref.style.cursor = "pointer"; tdHref.setAttribute("web", service.FieldNames[i].Links[m].FieldName); tdHref.setAttribute("type", service.FieldNames[i].Links[m].DisplayText); tdHref.style.textDecoration = "underline"; tdHref.onclick = function() { if (this.getAttribute("type") == "Website") { OpenWebSite(feature.AGENCYURL); } else { OpenServiceMail(feature.EMAIL); } }; trLink.appendChild(tdHref); tdHref.innerHTML = service.FieldNames[i].Links[m].DisplayText; } } else { tdData.innerHTML = feature[service.FieldNames[i].FieldName]; } Run the application again. The website and email links works correctly.

Etapas para Reproduzir

ID do Erro: BUG-000087527

Software:

  • ArcGIS for Local Government

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download