From the course: Apple watchOS App Development: Advanced APIs

Unlock the full course today

Join today to access over 23,000 courses taught by industry experts.

Animated images

Animated images

- [Instructor] So you've just made a map. For most Core Location and MapKit, you can use the same methods you use in iOS, there's two exceptions. As we saw in the last video, you have to use regions to set your map location and there's only one map type. The second exception you can sort of see on the screen right now, or actually not see it, and that's annotations. Like settings maps, they are much simpler than their iOS counterparts. You can set pins and image annotations, but there are no overlays. They are simple methods, too, with no delegates required. There are only three methods to add an annotation. For a pin, I can add it very quickly. So go ahead and stop the code we got. Close up the console again. And right where we are in maps, I can put right underneath there, map.addAnnotation, and you can see there are three. One is for pins, two is for images. And so all I have to do is do addAnnotation, and put pizzaCoordinate, and we only have three map colors, green, purple and…

Contents