是否可以使用“样式化的地图"与MKMapView? [英] Is it possible to use "Styled Maps" with MKMapView?

查看:73
本文介绍了是否可以使用“样式化的地图"与MKMapView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

干杯

大约一年以来,Google允许您根据需要调整其地图的样式.他们提供的工具也可以轻松创建样式:

for about a year now Google allows you to adjust the styling of their maps according to your needs. They offer a tool which allows for the easy creation of styles too:

Google Maps API样式的地图向导

我想知道的是:可以将其API的此功能与Map Kit Framework中提供的MKMapView一起使用吗?如果是这样,我将如何以及在何时将向导生成的JSON代码提供给API?

What I'd like to know is: can this feature of their API be used with MKMapView as provided in the Map Kit Framework? If so, how and at which point would I feed the JSON code which the wizard produces to the API?

如果这不适用于MKMapView:在应用中包含Google样式地图的下一个最佳方法是什么?

If this doesn't work with MKMapView: What's the next best way to include Googles Styled Maps in an app?

非常感谢!

推荐答案

据我所知,MKMapView不能像Google Maps API那样即开即用"地提供此功能. 类参考似乎支持这个假设.您可以使用批注和叠加来重新实现某些样式(请参见类参考),但是前提是您有权访问兴趣点数据.您的成功可能取决于您要使用哪种样式.

As far as I'm aware, MKMapView doesn't provide this functionality "out of the box" as the Google Maps API does; the class reference, seems to support this hypothesis. You could re-implement some of the styles using annotations and overlays (see the class reference), but that assumes you have access to the point of interest data. Your success will likely depend on what styles you want to use.

关于第二个最佳方法,我在iPad上打开了您的链接,即样式化的地图向导,它似乎可以正常工作.也许您可以在网上某个地方托管一个预先设置样式的地图,然后使用UIWebView将该样式地图简单地显示在您的应用程序中?显然,这会在某些方面限制您,但至少会设置样式!

As for the next best way, I opened your link, the styled maps wizard, on my iPad and it seems to work flawlessly. Perhaps you could host a pre-styled map somewhere online and simply show it in your app using a UIWebView? That would obviously limit you in some ways, but at least it would be styled!

这篇关于是否可以使用“样式化的地图"与MKMapView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆