I have to add a custom label on Marker pin of Google maps in IOS.
I have already implemented markerInfoWindow method. But it works after i tapped on marker/Pin.
I need to show custom label at start as long as mapview will load on view without performing any action. As we can set icon or title on the marker, I need to show my own Custom view on it.
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {
CLLocationCoordinate2D anchor = marker.position;
// CGPoint point = [mapView.projection pointForCoordinate:anchor];
// self.calloutView.title = marker.title;
[self.calloutView setFrame:CGRectMake(0, 50, 25, 25)];
self.calloutView.layer.cornerRadius = 11.0;
self.calloutView.layer.masksToBounds = YES;
self.calloutView.layer.borderColor = [UIColor clearColor].CGColor;
self.calloutView.layer.borderWidth = 0.0;
self.calloutView.hidden = NO;
return self.calloutView;
}