Project a point
I am having trouble mapping a point on from user inputs. I have a workflow which allows users to input a latitude/longitude coordinate pair (in GSC NAD 1983, WKID = 4269). The coordinates are assigned to an ESRI MapPoint. The map point is then assigned to an ESRI geometry which is plotted using the AddMarkup external command. The problems seems to be that although the coordinates are passed in lat/lon with their spatial reference the markup is plotted as if the lat/lon was web Mercator meters (off the coast of Africa).
Does Geocortex do project on the fly of markups? Does anyone know of a workaround for this issue?
Cheers,
Benjamin Zank
-
Hello Benjamin,
If the Base Coordinate System of your site is Web Mercator, then a work around does exist. Create a MapPoint using the user input Latitude as Y and Longitude as X. Give it a Spatial Reference of WKID = 4365 (Geographic WGS84 Cooridinates). Assign the MapPoint to an ESRI Geometry. Import the ESRI.ArcGIS.Client.Projection Namespace and create a Variable named Converter of type ESRI.ArcGIS.Client.Projection.WebMercator, set its default value to "new ESRI.ArcGIS.Client.Projection.WebMercator". Assign the ESRI Geometry containing the map tip to "Converter.FromGeographic(geo)" where geo is the name of the ESRI Geometry containing the MapPoint. Your ESRI Geometry is now projected to the Web Mercator System and you can Plot it using the AddMarkup Command.
Hope this helps,
Paul
0 -
Paul,
This works. Thank you very much.
Benjamin Zank
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer