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

前端 未结 8 601
故里飘歌
故里飘歌 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:36

    GMSMarkerOptions *myLocationOptions = [GMSMarkerOptions options];
    myLocationOptions.title = @"My Location";
    myLocationOptions.snippet = @"Lat:...., Lang:....";
    
    mapView.selectedMarker = [mapView addMarkerWithOptions:myLocationOptions];
    

    (note that it's Options, not Option)

提交回复
热议问题