how to create a featureset from a mappoint
I need to reproject a map point from geographic to web mercator. the project form calls for a feature set. how do I create a feature set from a map point?
-
Hi Jeff,
It's probably much easier to use an Assign statement to change the spatial reference on the map point, instead of trying to force it into a feature set that you can use in the Project Task.
Try myMapPoint.SpatialReference = new Esri.ArcGIS.Client.geometry.spatialreference(102100)
-Victoria
0 -
If you only need to project a geometry between Web Mercator and Geographic (WGS84) you can use one of the following expressions in an Assign activity where " geometry " is your source geometry:
new ESRI.ArcGIS.Client.Projection. WebMercator ().FromGeographic(geometry);
new ESRI.ArcGIS.Client.Projection. WebMercator ().ToGeographic( geometry );
(http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html) http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html
These don't require a geometry service or the Project activity.
--Ryan
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer