Skip to main content

Update Graphics Layer Coordinate System

Comments

5 comments

  • Zack Robison
    Wait, you're using the update graphics activity instead of the highlight command?  I am curious as to why!  The custom renderer?

     

    My guess is that you are getting the geometries from the featureset, queried previously from your arcgis service. That featureset will by default be returned in the spatial reference of the service (your county) but there is a parameter to ge the output reference of your choosing (with some restrictions I understand).  You can also use the reproject activity to turn your featureset into something workable.
    0
  • John Nerge
    Yes, I'm using update graphics so I can use the custom renderer as well as create different graphics. Here's an example where I'm using a blue fill for selected parcels and a red outline for a user-specified buffer distance.

     

    User-added image

     

    I'm also using update graphics because the mailing labels workflow that uses the activities also gives the user the option to add or remove parcels from the select, so I can run update graphics multiple times to rehighlight the parcels they selected. It also rehighlights the parcels one last time when they export the labels (in case they chose to exclude commercial, vacant, or other properties).

     

    Ah, I'd forgotten about the Out Spatial Reference argument on Query Task. Is that what you're referring to? I haven't use it before, so what do I need to provide (WKID, WKT, something else)?
    0
  • Zack Robison
    I think that there' a spatial reference class, so either an object of that class or "New Esri.ArcGis.Client.Geometry.SpatialReference(wkid)"
    0
  • John Nerge
    Looks like setting the Out Spatial Reference on the Query Task that makes the feature set for my Update Graphics Layer did the trick! (Phew, that was a mouthful.)

     

    Thanks for the tip, Zack!
    0
  • Zack Robison
    Just returning the favor!
    0

Please sign in to leave a comment.