Is it possible to use “Styled Maps” with MKMapView?

こ雲淡風輕ζ 提交于 2020-01-15 01:18:27

问题


Cheers,

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 Styled Maps Wizard

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?

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

Thanks alot!


回答1:


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.

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!



来源:https://stackoverflow.com/questions/6959633/is-it-possible-to-use-styled-maps-with-mkmapview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!