Reputation: 161
Custom Marker Image will not appear only default marker appears in it's place.
In ViewWillAppear:
RMPointAnnotation *annotation3 = [[RMPointAnnotation alloc] initWithMapView:parkMap coordinate:coordinate andTitle:title];
[parkMap addAnnotation:annotation3];
- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation
{
if (annotation.isUserLocationAnnotation)
return nil;
RMMarker *marker;
marker = [[RMMarker alloc] initWithUIImage:[UIImage imageNamed:@"square_small.png"]];
marker.canShowCallout = YES;
return marker;
}
Upvotes: 1
Views: 569
Reputation: 5128
Check the docs and don't use RMPointAnnotation
.
If you wish to customize the layer appearance in more detail, you should instead create an RMAnnotation and configure its layer directly. Providing a layer manually for instances of RMPointAnnotation will not have any effect.
Upvotes: 1