1. José Manuel Sánchez Peñarroja
  2. BMF

Commits

José Manuel Sánchez Peñarroja  committed 6b1b187

Added border width and border color to map annotation protocol

  • Participants
  • Parent commits 12e13d1
  • Branches master

Comments (0)

Files changed (4)

File Example/Example.xcworkspace/xcuserdata/josanchez.xcuserdatad/UserInterfaceState.xcuserstate

  • Ignore whitespace
Binary file modified.

File bmf/ios/view controllers/BMFMapAnnotation.h

View file
  • Ignore whitespace
 
 - (MKPinAnnotationColor) pinColor;
 
+- (CGFloat) borderWidth;
+- (UIColor *) borderColor;
+
 @end

File bmf/ios/view controllers/BMFMapAnnotationFactory.m

View file
  • Ignore whitespace
 	if (!view) {
 		MKPinAnnotationView *pinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:annotation.annotationID];
 		if ([annotation respondsToSelector:@selector(pinColor)]) pinView.pinColor = annotation.pinColor;
-//		else pinView.pinColor = MKPinAnnotationColorRed;
 		view = pinView;
 	}
 	
 	view.canShowCallout = annotation.canShowCallout;
 	if ([annotation respondsToSelector:@selector(annotationImage)]) view.image = annotation.annotationImage;
+	if ([annotation respondsToSelector:@selector(borderWidth)]) view.layer.borderWidth = annotation.borderWidth;
+	if ([annotation respondsToSelector:@selector(borderColor)]) view.layer.borderColor = annotation.borderColor.CGColor;
 	
 	if (self.calloutDelegate) {
 		view.leftCalloutAccessoryView = [self.calloutDelegate leftCalloutAccessoryView];
 		view.rightCalloutAccessoryView = [self.calloutDelegate rightCalloutAccessoryView];
 	}
 	
+	
 	return view;
 }
 

File bmf/shared/utils/BMFUtils.m

View file
  • Ignore whitespace
 
 #endif
 
-
 @end