Zum Hauptinhalt gehen

Change markup colors within workflow

Kommentare

6 Kommentare

  • Kevin Penner
    Hi John,

     

    Totally possible to use the UpdateGraphicsLayer activity. Make as many layers as you want and then remove then when you are finished. This activity will give you full control to mark up the map how you wish.

     

    -Kevin
    0
  • Nico Burgerhart
    For the Renderer property in the UpdateGraphicsLayer activity, use something like this (example for blue points). New ESRI.ArcGIS.Client.SimpleRenderer With { .Symbol = New ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol() With { .Color = New System.Windows.Media.SolidColorBrush() With { .Color = System.Windows.Media.Color.FromArgb(255, 0, 0, 255) }, .Size = 9 } }

     

     
    0
  • John Nerge
    If I could choose two best answers, I would, thanks! This should be plenty to get me started.
    0
  • Permanently deleted user
    Hi John,

     

    How did you generate the unique layernames/layerids for the markups added with AddMarkupGeometry so that they can be passed to the UpdateGraphicsLayer activity? 

     

    Thank you,

     

    Stephanie

     

     
    0
  • John Nerge
    So AddMarkupGeometry and UpdateGraphics layers are two different things.

     

    AddMarkupGeometry is an external command that will add a markup based on an input geometry (and uses the default markup settings of your viewer). The markup behaves like any other markup, i.e., you can use the drawing tools to edit, move, or erase it.

     

    UpdateGraphicsLayer is a client activity that will add a graphic to your map based on an input feature set (and uses whatever color and style settings you pass to it using the Renderer argument).

     

    You can have multiple graphics with multiple styles by using multiple activities with different Ids. For example, if you wanted to highlight selected parcels with one color and then show a buffer distance from them in another color, you would run two different UpdateGraphicsLayer activities with two different  Graphics Layer Ids.

     

    To replace or remove graphics, you have to run the UpdateGraphicsLayer activity again using the same Graphics Layer Id and with the Remove All Features argument set to true (you can redraw any existing graphic with a new feature set or leave the FeatureSet argument blank to remove the graphic).
    0
  • Permanently deleted user
    Thank you, John.  I totally misunderstood the responses to your original post.  I thought they were implying that the styles/renderes for your markups could be set using the Update Graphics Layer activity.  I couldn't figure out how that was possible.  Thank you for clarifying for me!
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.