Article Preview
Buy Now
FEATURE
MapKit Part 7
Implementing Maps in Xojo desktop apps with the MapKitMBS plugin
Issue: 18.6 (November/December 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): 43,244
Starting Page Number: 61
Article Number: 18605
Resource File(s):
project18605.zip Updated: 2020-11-02 09:52:04
Related Link(s): None
Excerpt of article text...
Last time we heard about map annotations, and that they are any object that implements the map annotation interface/protocol and has been added to a map. A map annotation is a fairly simple construct that has a title and subtitle property of type
String
and a coordinate property of typeCLLocationCoordinate2DMBS
.We also heard about Annotation Views:
- An annotation view is derived from the
MKAnnotationView
class and draws the visual representation of the annotation on the map surface.It is important to realise that the annotation itself is not what is being shown on the map—true to the Model-View-Controller design, it is just the "Model" (the data) behind the map. What is being shown is determined by the "View"—the annotation's
AnnotationView
, and you get anAnnotationView
for an annotation by passing any annotation that enters the map's visible area to the map'sviewForAnnotation
event.But how do annotation views work under the hood?
- Annotation views are (loosely) coupled to a corresponding annotation object.
...End of Excerpt. Please purchase the magazine to read the full article.