Change GMSMapView default map background color in iOS

你。 提交于 2020-01-20 08:46:08

问题


The GMSMapView in iOS has a default background color of tan, or something like it.

I have a requirement to change that color to white. I've tried using a subclass of GMSTileLayer without success (or errors). I need to place custom map overlays with white backgrounds onto the map view. In areas without the overlays, the base map color needs to match (white).

Tried the following without any luck:

[mapView setBackgroundColor:[UIColor whiteColor]];

Can anyone offer suggestions, or point me to a resource (other than Google) that might help?

Thanks!


回答1:


Now you can change GMSMapStyle of you map (available with Google Maps SDK for iOS 2.1). Styling works only on the kGMSTypeNormal map type. I create my own style with https://mapstyle.withgoogle.com/ Hope, it will help you.



来源:https://stackoverflow.com/questions/33106448/change-gmsmapview-default-map-background-color-in-ios

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