I am building an Apple Watch App, with should place a pin in a map position, I am using the Xcode simulator, but the map just does not load...
Here is my sample code, there is some other kind of settings that I am missing?
import WatchKit
import MapKit
class MapController: WKInterfaceController {
@IBOutlet var map: WKInterfaceMap!
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
let centerOfMap = CLLocationCoordinate2D(latitude: -3.743205, longitude: -38.514871)
let pinPosition = CLLocationCoordinate2D(latitude: -3.65, longitude: -38.514871)
let coordinateSpan = MKCoordinateSpanMake(1, 1)
self.map.addAnnotation(pinPosition, withPinColor: .Red)
self.map.setRegion(MKCoordinateRegion(center: centerOfMap, span: coordinateSpan))
}
}
It does not load map tiles for simulator. You'll have to test it on the actual watch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With