ios - 使用 Google Maps API for IOS 的区域边界坐标

标签 ios xcode google-maps maps mkmapview

对不起,我的英语不好。

是否可以使用 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/

相关文章:

ios - iOS QuickAction 的 Objective-C 代码

ios - AVSpeechSynthesizer 不适用于 iOS10

javascript - 放置在 map 上后,除了谷歌地图中的前五个图标外,所有图标都消失了

ios - GMSAutocompleteViewController 本地化

ios - 静态单元格不显示在模拟器中

ios - 未找到架构 armv7 的 React Native 符号

ios - UIScrollView 重叠

java - SupportMapFragment 在主线程上加载并卡住界面(忽略getMapAsync)

java - GoogleMap v2 Android 中的 Z 排序标记

ios - Web 应用程序与 iOS 应用程序接口(interface)以获取推送通知