0

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.

EDIT: SOE is required to cater for our complex entitlement needs.

I've worked through the bundled SDK samples but can't find anything appropriate.

So my questions are:

  • Can an SOE return an image? I've been experimenting with the REST request appending &format=image but I just cant get my SOE to return a png
  • is it possible to style particular features differently based on an attribute? If so, how would I update the legend to include the different styled feature
  • Yes, it could, but the easiest way would be by invoking a map service, which would be the long way around the block. – Vince Jan 30 at 12:08
  • Thanks @Vince, does that mean an SOE can not directly return a png? – Christian Weaves Jan 30 at 14:08
  • Of course it could, but writing a map generator from scratch could take years – Vince Jan 30 at 14:51
4

I think you do not have to develop SOE for your goal.
If you have published a MapServer, you can easily request the image by indicating the renderer you want.
Here is the link to the documentation:
https://developers.arcgis.com/rest/services-reference/dynamic-layer-table.htm
And this is an example with the Javascript SDK:
https://developers.arcgis.com/javascript/3/jssamples/renderer_dynamic_layer_change_attribute.html

UPDATE AFTER REQUIREMENT SOE

  • Can an SOE return an image? I've been experimenting with the REST request appending &format=image but I just cant get my SOE to return a png

    The answer is yes. Here is the documentation:
    https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#33a68497-6c21-430f-a783-4d3333e46cb4.htm
    and at the end you find a sample that returns a PNG.

  • is it possible to style particular features differently based on an attribute? If so, how would I update the legend to include the different styled feature

    The answer is yes.
    You can use the dynamic layer to get the image from the MapServer and return it to the client.
    Same for the legend.
  • I should have mentioned an SOE is required to handle our complex entitlement needs. I stripped out this info to make the problem as basic as possible... my bad. – Christian Weaves Jan 31 at 8:58
  • Then update the question by specifying that SOE is a requirement. – lele3p Jan 31 at 9:58
  • Ok thanks updated. Im obviously not being clear and I apologise in advance, I want the resulting png to be the features plotted on a map, I dont want to have to plot the features myself after all this is what we pay ESRI all that money for? – Christian Weaves Jan 31 at 11:56
  • This is the documentation of the MapServer export method: developers.arcgis.com/rest/services-reference/export-map.htm This method accepts the dynamicLayers parameter where you can specify how to render the map. – lele3p Jan 31 at 13:32
  • Slowly getting somewhere now, thanks for the help! – Christian Weaves Jan 31 at 13:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.