View Full Version : Why is their a border around my annotation?

29.12.2015, 21:45
I'm creating an iOS mapping app using Skobbler's SDK (installed via CocoaPods. v2.5). I'm adding annotations to my Skobbler mapview, using custom views for my pins instead of using one of Skobbler's defaults. My pins will just be colored circles.

The problem is that my circles seem to be drawn with borders, but they shouldn't be.


My code is similar to the following:

let pin = UIView()
let diameter = 18
pin.layer.frame = CGRectMake(0, 0, diameter, diameter)
pin.layer.backgroundColor = UIColor.lightGrayColor().CGColor
pin.layer.cornerRadius = diameter/2

//Just for good measure... NO BORDER
pin.layer.borderColor = UIColor.clearColor().CGColor
pin.layer.borderWidth = 0

let annotation = SKAnnotation()
annotation.annotationView = SKAnnotationView(view: pin, reuseIdentifier: "viewID")
annotation.identifier = 1234
annotation.location = CLLocationCoordinate2DMake(44.1234, -111.1234)
mapView.addAnnotation(annotation, withAnimationSettings: animationSettings)

How can I avoid having borders drawn around my pins?

08.01.2016, 10:51
Adding a custom view to an annotation, a border it's set- thatís the way is generated at our core level