显示信息窗口标记

时间:2013-08-30 01:51:01

标签: ios google-maps google-maps-markers infowindow gmsmapview

iOS的等效代码是什么,用于显示iOS版Google地图中标记的信息窗口

Marker marker = myMap.addMarker(new MarkerOptions()
                 .position(latLng)
                 .title("Title")
                 .snippet("Snippet")
                 .icon(BitmapDescriptorFactory
                 .fromResource(R.drawable.marker)));

marker.showInfoWindow();

在android中就像这样。

1 个答案:

答案 0 :(得分:0)

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(17.4375194, 78.3808417);
marker.title = @"collabor";
mapView_.delegate = self;

marker.icon = [GMSMarker markerImageWithColor:[UIColor blackColor]];
marker.map= mapView_;
marker.snippet=@"snippet";

将自动显示信息窗口。 有关更多信息,请参阅Google的文档