Article Preview
Buy Now
FEATURE
Maps (Part 6)
A deep dive into Annotations
Issue: 18.5 (September/October 2020)
Author: Markus Winter
Author Bio: Markus is a Molecular Biologist who taught himself REALbasic programming in 2003 to let the computer deal with some exceedingly tedious lab tasks. Some call it lazy, he thinks it smart. He still thinks of himself as an advanced beginner at best.
Article Description: No description available.
Article Length (in bytes): 23,485
Starting Page Number: 79
Article Number: 18505
Resource File(s):
project18505.zip Updated: 2020-08-31 22:37:34
Related Link(s): None
Excerpt of article text...
Last issue we learned that if we want to display an annotation on a map, then we require two distinct objects: an annotation object and an annotation view:
- An annotation object conforms to the
MKAnnotation
protocol (an interface in Xojo) and manages the data for the annotation (such as the coordinate, title, and subtitle properties).
- An annotation view is derived from the
MKAnnotationView
class and draws the visual representation of the annotation on the map surface.But to understand what that means for implementing and using them, we need to know more about how annotations and annotation views relate to each other.
Relationship Counselling: Annotations Versus Views
An annotation and its annotation view are said to be only "loosely coupled"—there isn't a one-to-one relationship—and there is a very good reason for that.
...End of Excerpt. Please purchase the magazine to read the full article.