2013-02-22 5 views
1

정보 창 텍스트와 배경의 스타일을 지정하는 방법에 대한 아이디어는 아무도 없습니다. 핀을 만질 때 보여주는 막대 사탕인가요?마커의 정보 창 제어하기

또한 프로그래밍 방식으로 정보 창을 표시하도록 만드는 독창적 인 방법을 찾고 있습니다. 어떤 제안?

감사합니다 ...

p.s. 예! 여기 있어요!

답변

1

GMSMapView.hGMSMapViewDelegate :

/** 
* 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 
*/ 
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(id<GMSMarker>)marker; 
+0

감사합니다. – sberley

+0

문제 없습니다. 나는 infoWindow 작업을하고 있었고 나도 그렇게 오래 걸렸다. 정보창을 보여주기 위해서 :'self.mapView.selectedMarker = marker;'. 그것은 모두'GMSMapView.h'에 있습니다. – s12chung

+0

안녕하세요, 1) @interface MapsViewController : UIViewController 및 2) mapView_.delegate = self; 하지만 내 markerInfoWindow 호출하지 거기에 미리 솔루션 감사합니다 –

0

구글의 문서가이 분명 그렇게 위 @ s12chung의지도에 확대에 대한 답변을하지 않습니다, 여기에 다른 사람을 위해 (눈에 띄게 프로그래밍 방식으로 사람들을하려고를 정보 창을 만드는 방법 이를 수행하려면

GMSMarkerOptions *pin = [[GMSMarkerOptions alloc] init]; 
self.mapView.selectedMarker = [self.mapView addMarkerWithOptions:pin];