gpt4 book ai didi

iphone - 无法理解 MKMapPoint(s)

转载 作者:搜寻专家 更新时间:2023-10-30 20:26:17 26 4
gpt4 key购买 nike

在理解 MKMapPoint 时,任何人都可以指出正确的方向吗?

我知道这与在二维表面上放置地球表面有关。但是我不明白每个“点”是如何测量的?

谁能给我一个代码示例?

最佳答案

没什么可说的..只是一个在二维 map 上显示点的结构...这是文档所说的..

MKMapPoint A point on a two-dimensional map projection.

typedef struct { double x; double y; } MKMapPoint;

Fields x The location of the point along the x-axis of the map. y The location of the point along the y-axis of the map. Discussion If you project the curved surface of the globe onto a flat surface, what you get is a two-dimensional version of a map where longitude lines appear to be parallel. Such maps are often used to show the entire surface of the globe all at once. An MKMapPoint data structure represents a point on this two-dimensional map.

The actual units of a map point are tied to the underlying units used to draw the contents of an MKMapView, but you should never need to worry about these units directly. You use map points primarily to simplify computations that would be complex to do using coordinate values on a curved surface. By converting to map points, you can perform those calculations on a flat surface, which is generally much simpler, and then convert back as needed. You can map between coordinate values and map points using the MKMapPointForCoordinate and MKCoordinateForMapPoint functions.

When saving map-related data to a file, you should always save coordinate values (latitude and longitude) and not map points.

Availability Available in iOS 4.0 and later. Declared In MKGeometry.h

关于iphone - 无法理解 MKMapPoint(s),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9257758/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com