Zum Hauptinhalt gehen

Map Extent to New Feature

Kommentare

5 Kommentare

  • Nico Burgerhart

    Cast the extent envelope to a geometry object

    Create a new graphic object

    Assign the geometry to the .Geometry property of the graphic

    Create a new collection

    Add the graphic to it

    Use the collection in the Add Features activity

    0
  • Permanently deleted user

    Thanks Nico,

    It's the Cast activity i was missing. I have added it in, but i'm still getting errors at the AddFeatures stage, and I think it's still to do with the geometry not being applied (I can setup the workflow for the user to select the geometry and it works fine). I have a NewGeom variable (ESRI.ArcGIS.Client.Geometry.Geometry) and NewEnv (ESRI.ArcGIS.Client.Geometry.Envelope). How exactly do I use Cast to transfer the capture extent?

    Thanks again.

    0
  • Nico Burgerhart

     

    When you place a Cast activity on the canvas, you have to enter a data type. Select here ESRI.ArcGIS.Client.Geometry.Geometry

    A way to show the contents of your graphic is placing the following expression in an alert of prompt:

     

    New FeatureSet(New List(Of Graphic) From {myGraphicVariable}).ToJson().

    With some reformatting of the JSON you can use this in the Add Features operation on the ArcGIS Server REST endpoint

    http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000010m000000

    Warning: use of an alert/prompt (client) activity can introduce an error on the Add Features activity, this is related to serialization issues.

     

     
    0
  • Permanently deleted user

    ps.  I'm using Geocortex version 4.1.5 with a Silverlight 2.2 viewer.

    0
  • Nico Burgerhart

    Which error do you get on the Add Features?

    0

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