Hello,
Im wondering a reason why my infoTemplate in one layer is not working. I have a dynamic service with 5 layers and all the other ones are working perfectly when i click in the map, showing the information about them, but when i click the number (2) it doesnt show anything and it says "no info available"
Here is where i define the infoTemplate.
interrClienteSED<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setInfoTemplates</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>infoTemplate<SPAN class="punctuation token">:</SPAN> getInfoTemplate2<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getCriticalNisInfo</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="number token">1</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>infoTemplate<SPAN class="punctuation token">:</SPAN> getInfoTemplate2<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getNISInfoConf</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="number token">2</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>infoTemplate<SPAN class="punctuation token">:</SPAN> getInfoTemplate2<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getNISInfoPred</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="number token">3</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>infoTemplate<SPAN class="punctuation token">:</SPAN> myinfotemplate<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getSubConf</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="number token">4</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>infoTemplate<SPAN class="punctuation token">:</SPAN> myinfotemplate<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getSubPred</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Here is where i have it: 2: {infoTemplate: getInfoTemplate2.getNISInfoPred()},
And this function gives me the infoTemplate that i use:
<SPAN class="token function">getNISInfoPred</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">let</SPAN> chqNisInfoTemp2<SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">InfoTemplate</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
chqNisInfoTemp2<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setTitle</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"<b>NIS: ${ARCGIS.DBO.CLIENTES_XY_006.nis}</b>"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">let</SPAN> chqNisInfoContent2 <SPAN class="operator token">=</SPAN>
<SPAN class="string token">"<div style=padding-top: 10px;><b>ID Orden:</b> ${ARCGIS.dbo.view_tiempo_order_po.id_orden}<br></div>"</SPAN><SPAN class="punctuation token">;</SPAN>
chqNisInfoTemp2<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setContent</SPAN><SPAN class="punctuation token">(</SPAN>chqNisInfoContent2<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> chqNisInfoTemp2<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>It doesnt show anything. Even if the fields are not correct, it suppose to show the template with ID Orden and NIS empty, but it just doesnt work at all.