Skip to main content

Zoom for single selected feature

Comments

4 comments

  • Permanently deleted user

    Hi Blair,

    Try using the following syntax to get the extent of the feature from the feature set:

    myFeatureSet.Features.First.Geometry.Extent()

    Note: This assumes that you only have one feature returned. You will also have to Import System.Linq to use First

    -Victoria

    0
  • Permanently deleted user

    Hi Victoria and Blair

    I have found that :

    myFeatureSet.Features(0).Geometry.Extent

    also works and doesn't need the System.Linq namespace to work

    Thanks

    Ralph

     

    0
  • Permanently deleted user

    Thanks Ralph!

    That worked first try! Are these extra actions just tricks you pick up along the way or is there any solid documentation (link?) out there that can be used? I am finding that the guessing game combined with forum chatter isn't usually getting me answers all that fast... 

    Thanks for the help!

     

     

    -Blair
    0
  • Permanently deleted user

    Hi Blair

    I guess it starts with understanding what is being returned. ie what is a FeatureSet? (read http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.FeatureSet_members.html )

    FeatureSet.Features gives you an IList(Of Graphic)  (Graphic is an ESRI object, read further here: http://help.arcgis.com/en/webapi/silverlight/apiref/api_start.htm  )

    IList is a .net framework object (http://msdn.microsoft.com/en-us/library/5y536ey6.aspx) http://msdn.microsoft.com/en-us/library/5y536ey6.aspx   (Try google search for  .net IList )

    Forum chatter is a bit like a field of icebergs, the background information that you need doesn't always show above the surface (in the forums)

    Hope that helps as to how I figure some of these these issues

    Regards

    Ralph

    0

Please sign in to leave a comment.