简体   繁体   English

在 c# 应用程序中使用嵌入式 map 时使用 UTM 而不是 latlong

[英]Using UTM instead of latlong when using an embedded map in c# app

So I have a mobile app that collects data and one of the components is a map that shows your location in the world.所以我有一个收集数据的移动应用程序,其中一个组件是 map,它显示您在世界上的位置。

This app is created using c# UWP and I am using ESRI ArcGISRuntime for the spatial component.此应用程序是使用 c# UWP 创建的,我使用 ESRI ArcGISRuntime 作为空间组件。

I have the map created and when I move around I am able to show my location as latitude and longitude.我创建了 map,当我四处走动时,我可以将我的位置显示为纬度和经度。 I am able to get my location in real time in both decimal degrees and degrees minute seconds, as well as the altitude using Coordinate.Point.Position.我可以使用十进制度和度分秒以及高度使用 Coordinate.Point.Position 实时获取我的位置。

I would like to have the option of showing my location in UTM coordinates but I have not found a simple way like I can with with lat long.我希望可以选择在 UTM 坐标中显示我的位置,但我还没有找到像经纬度那样的简单方法。 Does anyone know how?有谁知道怎么做?

You should use the CoordinateFormatter .您应该使用CoordinateFormatter It has a ToUtm() method that takes a MapPoint (which can be in any spatial reference) and some info about how to convert it to a UTM string.它有一个ToUtm()方法,该方法采用 MapPoint(可以在任何空间参考中)和一些关于如何将其转换为 UTM 字符串的信息。

Hope that helps希望有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM