Zum Hauptinhalt gehen

reproject map extent using geometry service

Kommentare

2 Kommentare

  • Permanently deleted user

    To union the contents of a featureSet:

    1. Use a foreach loop to add each component graphic of the featureSet to a Collection<Graphic>

    2. Use the Collection<Graphic> as input to the UnionTask, and put the results in a ESRI.ArcGIS.Client.Geometry.Geometry variable. (note: although a featureSet is a collection of Graphics, and the UnionTask appears to ask for a featureSet, it will not accept one. Yes, this is a bug.)

    3. Your geometry variable can now give you the extent -- geometry.Extent

    To reproject to Web Mercator:

    ?1. Create a new instance of the ESRI.ArcGIS.Client.Projection.WebMercator class. It needs to be initialized to a default value: new ESRI.ArcGIS.Client.Projection.WebMercator()

    2. Now you can use it to reproject a geometry in geographic coordinates to WebMercator. Say you called your instance 'project' -- then the syntax would be project.FromGeographic(geometry). A ToGeographic method is also available.

    0
  • Permanently deleted user

    Does anyone have a workflow example using projections, it would be very helpful in undestanding.

    0

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