You can implement markerInfoWindow method from GMSMapViewDelegate
An example implementation for displaying a custom info window in Swift:
func mapView(mapView: GMSMapView!, markerInfoWindow marker: GMSMarker!) -> UIView! { var infoWindow = NSBundle.mainBundle().loadNibNamed("CustomInfoWindow", owner: self, options: nil).first! as CustomInfoWindow infoWindow.label.text = "\(marker.position.latitude) \(marker.position.longitude)" return infoWindow }
You can visit this GitHub page for a detailed implementation.
Depending on how you want your info window to look, you can change the background color by doing infoWindow.backgroundColor = UIColor.redColor() or by changing the shape of your info window by doing infoWindow.layer.cornerRadius = 10.0f or even adding image by executing infoWindow.imageView.image = UIImage(named: "image.jpg") .
source share