Scenario: For my prototype I have published a service with one layer. The layer has 3 polygons with an entitlement attribute. Only one polygons entitlement is set to true. I need to write an SOE (in Java) to draw the polygons return an image, the polygon with the attribute set to true needs to be drawn differently, maybe a thicker line or an additional inner border or something along those lines. Unfortunately I don't have the luxury of drawing the polygons client side due to the shear volume of features.
I've worked through the bundled SDK samples but can't find anything appropriate.
So my questions are:
Thank you
Yes you can return a image:
<SPAN class="keyword token">else</SPAN> <SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>outputFormat <SPAN class="operator token">==</SPAN> <SPAN class="string token">"image"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> responseProperties <SPAN class="operator token">=</SPAN> <SPAN class="string token">"{\"Content-Type\" : \"image/png\"}"</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">return</SPAN> Helper<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ImageToByte</SPAN><SPAN class="punctuation token">(</SPAN>image<SPAN class="punctuation token">,</SPAN> System<SPAN class="punctuation token">.</SPAN>Drawing<SPAN class="punctuation token">.</SPAN>Imaging<SPAN class="punctuation token">.</SPAN>ImageFormat<SPAN class="punctuation token">.</SPAN>Png<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">static</SPAN> <SPAN class="keyword token">byte</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="token function">ImageToByte</SPAN><SPAN class="punctuation token">(</SPAN>Image img<SPAN class="punctuation token">,</SPAN> System<SPAN class="punctuation token">.</SPAN>Drawing<SPAN class="punctuation token">.</SPAN>Imaging<SPAN class="punctuation token">.</SPAN>ImageFormat format<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">byte</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> byteArray <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">byte</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN>MemoryStream stream <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">MemoryStream</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> img<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Save</SPAN><SPAN class="punctuation token">(</SPAN>stream<SPAN class="punctuation token">,</SPAN> format<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> stream<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Close</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> byteArray <SPAN class="operator token">=</SPAN> stream<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToArray</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="keyword token">return</SPAN> byteArray<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></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
For change render I advise use dynamic layer: About dynamic layers—Documentation (10.3 and 10.3.1) | ArcGIS Enterprise (for details see 'Changing symbols and renderers' Alternatives to server object extensions—Documentation (10.3 and 10.3.1) | ArcGIS Enterprise )
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.