Converting latitude and longitude to Mercator

1351
2
Jump to solution
09-19-2017 06:21 PM
RichardRolston
New Contributor

I'm using version 100.1.0.0 in a WPF application.  How can I convert from latitude and longitude to WebMercator.  Is there a routine already available?

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

The GeometryEngine has a project method that will convert from any spatial reference to a new spatial reference

View solution in original post

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

The GeometryEngine has a project method that will convert from any spatial reference to a new spatial reference

0 Kudos
RichardRolston
New Contributor

Thanks for the info.  Here's the solution...

MapPoint mapPointObjectToConvert = new MapPoint(longitude, latitude, SpatialReferences.Wgs84);
MapPoint mapPoint = Esri.ArcGISRuntime.Geometry.GeometryEngine.Project(mapPointObjectToConvert, SpatialReferences.WebMercator) as MapPoint;

0 Kudos