对不起,我的英语不好。
是否可以使用 Google map API 获取区域边界纬度/经度以绘制区域多边形。
使用它我需要在 MKMapview 上绘制叠加层。
需要任何建议。
提前致谢。
谢谢, 柴坦尼亚
最佳答案
是的,可以使用 Google Places API
获取经纬度,适用于 iOS 的 Google Places API 为您的应用程序提供了有关地点的丰富信息,包括地点的名称和地址,以纬度/经度坐标指定的地理位置。除此之外,您还可以使用 overlays
将内容分层覆盖 map 的大部分区域。覆盖对象是任何符合 MKOverlay 的对象。协议(protocol)。叠加层对象是一个数据对象,其中包含指定叠加层的形状和大小及其在 map 上的位置所需的点。叠加层可以表示形状,例如圆形、矩形、多段线以及简单或复杂的多边形。您还可以定义自己的自定义叠加层来表示其他形状。
注意:
In iOS 7 and OS X v10.9 and later, the presentation of an overlay is handled by an
overlay renderer
object, which is an instance of the MKOverlayRenderer class. The job of the renderer is to draw the overlay’s content onto the screen when asked to do so by the map view. For example, if you have a simple overlay that represents a bus route, you could use a polyline renderer to draw the line segments that trace the route of the bus. You could also define a custom renderer that draws both the bus route and icons at the location of each bus stop. When specifying overlays, you can add them to specific levels of the map, which allows them to be rendered above or below other types of map content. Prior to iOS 7, overlays a Show less Dexter Datul
Dexter Datul 1:07 PM Today re drawn on onscreen using overlay views, which are instances of the MKOverlayView class.
配置 map 界面时,您可以随时添加叠加层对象。 map View 使用每个覆盖对象中的数据来确定相应的覆盖 View 何时需要出现在屏幕上。当叠加层在屏幕上移动时, map View 会要求其委托(delegate)创建相应的叠加层渲染器。
关于ios - 使用 Google Maps API for IOS 的区域边界坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38571468/