1

Is there a way to make Google Maps completely transparent in iOS Swift or Objective-C? All I want to see is the the myLocationEnabled Blue Dot without any of the maps behind it. Is this possible? I know this is a somewhat ridiculous question...but you can see my reason for wanting to do this here. I am thinking about trying to put a transparent Google Map over a regular Google Map as a solution...

Community
  • 1
  • 1
stepheaw
  • 1,683
  • 3
  • 22
  • 35

1 Answers1

1

Yes, set the mapType in your GMSMapView object to kGMSTypeNone, e.g.:

@IBOutlet weak var mapView: GMSMapView!

override func viewDidLoad() {
    super.viewDidLoad()
    mapView.mapType = kGMSTypeNone
    mapView.myLocationEnabled = true
    mapView.opaque = false
    mapView.alpha = CGFloat(1.0)
}

Map Objects - Google Maps SDK for iOS

Ruud Kalis
  • 264
  • 3
  • 9
  • Thanks!! I will try on my Mac later to confirm – stepheaw Apr 20 '15 at 13:52
  • No, this isn't really what I was looking for. It doesn't make the map transparent. I cant see any layers behind it – stepheaw Apr 20 '15 at 23:17
  • I get your point. I have added some code to make the view transparent. The thing is just that this will make the whole GMSMapView transparent, so the myLocation blue dot too. But you could probably add that as a UIImage in a different UIView on top of the MapView. – Ruud Kalis Apr 21 '15 at 09:57