Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 18.6 ('Git')
Instant purchase and download via GumRoad!

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):

Download Icon 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 type CLLocationCoordinate2DMBS.

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 an AnnotationView for an annotation by passing any annotation that enters the map's visible area to the map's viewForAnnotation 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.