Hoppa till huvudinnehållet

What is the most effective way to apply symbology based on a renderer definition in GW5?

Kommentarer

10 kommentarer

  • Permanently deleted user

    An abstraction of our current workflow is: query a REST endpoint, create a feature set, set the symbol based on a JSON definition, then add a graphics layer. I realize that there is a get renderer from JSON activity, however, there is no 'set' activity and no example usage on the sample site. Any guidance on how to accomplish this would be greatly appreciated!

    0
  • Nelson Dobbs

    I believe there is one step you are missing. Use the "Create Feature" activity, you will put this right before the Add A Graphics Layer activity.

    0
  • Permanently deleted user

    Thanks for the input. I am able to accomplish what you suggested using a simple symbol JSON definition but not a renderer JSON definition. I need to apply custom symbology based on unique values of a particular attribute. I'm hoping to use a renderer to apply a series of custom symbols.

    0
  • Nelson Dobbs

    So did this workflow from the sample site not help?

     

    https://latitudegeo.maps.arcgis.com/home/item.html?id=e144ffb093344710a836675f729be097

    0
  • Permanently deleted user

    My challenge is figuring out which activity to use to set the parsed renderer for the purpose of applying the embedded symbology. I am able to get and parse a renderer, but how do I set (or apply) that renderer on a layer or feature set? Setting a symbol isn't quite equivalent. I am beginning to wonder if I will have to iterate over the renderer to extract all unique symbols then have an attribute value lookup to set feature symbols based on the value for that particular attribute. I was hoping that there was a simpler approach.

    0
  • Nelson Dobbs

    Ok, I see now, sorry.

    I use a foreach and then a switch to filter through the attributes and then set the symbol for those features as they go through the foreach. It can be a pain depending on how many unique values you have in your renderer.

    0
  • Permanently deleted user

    Thanks, apologies for the lack of clarity in my question. That was my fear. I have about 700 unique symbol definitions. Was so hoping that there might be an easier way. Really appreciate your insight.

    0
  • Nelson Dobbs

    Yikes! My scenario is dealing with about 6 symbols, much easier to manage.

     

    Maybe someone from Lat/Geo can hop on here and provide you with a better solution.

     

    Good luck!

    0
  • Permanently deleted user

    Thanks, really appreciate your input! And yes, very much hoping that someone from Lat/Geo might have some ideas.

    0
  • Permanently deleted user

    closing the loop on this... after more trial and error, I realized there is a fairly straightforward workflow: get renderer from json, query feature service, add graphic layers features, get layer, and evaluate expression. Within the evaluate expression activity use the setRenderer() method to apply the json object definition of the renderer to the layer of interest..

    0

Du måste logga in om du vill lämna en kommentar.