How to show a Info window in iOS Google maps without tapping on Marker?

前端 未结 8 584
故里飘歌
故里飘歌 2020-12-05 07:14

I am new to iOS development. This is regarding Marker info window in Google Maps iOS SDK.

I understand, we can create a marker with info window using GMSMarkerOption

8条回答
  •  渐次进展
    2020-12-05 07:55

    swift 3

    self.mapView.selectedMarker = marker

    In the case of swift 3, you can open the snipet usint the selectedMarker

    If you are creating the marker in a similar way to:

    marker.position = CLLocationCoordinate2D(latitude: 34.1331168, longitude: -118.3550723)
    marker.title = "My super place name"
    marker.snippet = "Are you looking a place to play? This is your place! "
    marker.appearAnimation = kGMSMarkerAnimationPop
    marker.map = self.mapView
    

提交回复
热议问题