Zum Hauptinhalt gehen

Obtain Coordinates from Object

Kommentare

3 Kommentare

  • Nico Burgerhart

    Use the Get Geometries activity on the feature set resulting from your query task with the buffer geometry to get all the geometries in a list.

    But because I think you also need the name/code of the hydrants I think it's better loop over the feature set with a For Each activity and calculate the individual distances. You can get the geometry with the Geometry property of the graphic (graphicvariable.Geometry).

    http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Graphic~Geometry.html

    0
  • Permanently deleted user

    Nico,

    I'm trying to apply your suggestions with regards to using a forEach<Graphic> loop. But I'm having difficulty in converting the GetGeometries results, which  

    which is Ienumerable<Geometry>

    In the assign statement where the error is, I have:

    NewGraphic.geometry = Hydrant_Geometry_InBuffer, but this is not working?

    /customer/servlet/servlet.FileDownload?file=00P6000000em1KlEAI

     

    Any help would be appreciated.

    Walter

    0
  • Nico Burgerhart

    Try NewGraphic.geometry = Hydrant_Geometry_InBuffer.First

    (perhaps you need to import the System.Linq library to use this)

    Other advice: I see in the For Each actvity you use just Hydrant_FeatureSet, I think you should use Hydrant_FeatureSet.Features here.

    0

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