Acording to this demonstration ArcGIS API for JavaScript Sandbox I try to set labels to Feature Layer. My Feature Layer is created by Feature Collection and when I have exactly the same code as in demonstration no labels are shown.
Can anyone help please?
Here is my code:
<SPAN class="keyword token">var</SPAN> map <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN>showLabels <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> devFeatureCollection <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"layerDefinition"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"featureSet"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"features"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"geometryType"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriGeometryPoint"</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
devFeatureCollection<SPAN class="punctuation token">.</SPAN>layerDefinition <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"geometryType"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriGeometryPoint"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"objectIdField"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN