이것을 달성하는 가장 좋은 방법은 GMSMapViewDelegate의 mapView:markerInfoWindow:
메소드를 통해 GMSMapView에 정보 창에 대한 맞춤보기를 전달하는 것입니다.
이러한 목표를 달성하기 위해, 같은, 당신의 GMSMapView의 인스턴스의 대리인으로 자신을 설정 : 요청시
self.mapView.delegate = self;
그런 다음 사용자 정의에 UIView를 반환 :
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(id<GMSMarker>)marker
{
UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
customView.backgroundColor = [UIColor redColor];
return customView;
}
당신은 조금을 찾을 작업을 할 수 있습니다 정보는 GMSMapView 헤더를 보면 알 수 있습니다 :
/**
* Called when a marker is about to become selected, and provides an optional
* custom info window to use for that marker if this method returns a UIView.
* If you change this view after this method is called, those changes will not
* necessarily be reflected in the rendered version.
*
* The returned UIView must not have bounds greater than 500 points on either
* dimension. As there is only one info window shown at any time, the returned
* view may be reused between other info windows.
*
* @return The custom info window for the specified marker, or nil for default
*/
출처
2013-02-25 18:48:12
ndg
아래의 설명에 따라 작동하지 않습니다. 실제로 버튼으로 데모를 연결하고 확인해보십시오. – pfrank