Hi,
I'm trying to figure out how to update a layers symbology using an existing .lyr file. I can use the code below to add the layer file, but when I've already got the layer in my map all I really need to do is update the symbology.
QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="punctuation token">{</SPAN>
Uri myUri <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Uri</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">@"K:\DSM Shared\ArcMap Symbology\10.2 Schema\Editing Symbols\GISWRKS1.WORKS.WAT_Hydrant.lyr"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Layer newLayer <SPAN class="operator token">=</SPAN> LayerFactory<SPAN class="punctuation token">.</SPAN>Instance<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateFeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN>myUri<SPAN class="punctuation token">,</SPAN> MapView<SPAN class="punctuation token">.</SPAN>Active<SPAN class="punctuation token">.</SPAN>Map<SPAN class="punctuation token">,</SPAN> LayerPosition<SPAN class="punctuation token">.</SPAN>AddToTop<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>Any guidance is appreciated.
Thanks,