Macoun 2013: MapKit Clustering Techniken

Post on 25-Jun-2015

1.964 views 0 download

Tags:

description

Vortrag auf der Macoun 2013 in Frankfurt. Zusammenfassung: Der Einstieg in MapKit ist einfach, doch wer viele Markierungen anzeigen will stößt schon bald an die Grenzen des Machbaren. Der Vortrag zeigt am Beispiel der quelloffenen iPhone App “Stolpersteine”, wie man mehrere Tausend Markierungen auf einem MKMapView flüssig anzeigen kann.

Transcript of Macoun 2013: MapKit Clustering Techniken

Macoun⌘

MapKit Clustering Techniken@claushoefele

Stolpersteine

Ablauf

• Einführung MapKit

• Clustering

• iOS 7, Animationen

• Fragen

Einführung MapKit

MapKit

Draggable map annotations

Map overlaysHeading/tracking

Applevector tiles

Routing apps

Launch Maps APILocal search

3D

Directions API

Snapshots

Custom tiles

iOS 3 iOS 4 iOS 5 iOS 6 iOS 7

MKMapView

UIView

MKMapView

MKMapViewDelegate

Daten und Visualisierung

id <MKAnnotation>

UIView

MKAnnotationView

Annotations anzeigen

MKMapViewDelegate- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id < MKAnnotation >)annotation

MKMapView- (void)addAnnotation:(id < MKAnnotation >)annotation- (void)addAnnotations:(NSArray *)annotations

Standard Annotations/Overlays

Merkator-Projektion

Koordinatensysteme

CGRect, CGPoint, CGSize

• UIView Koordinaten:

MKCoordinateRegion, CLLocationCoordinate2D, MKCoordinateSpan

MKMapRect, MKMapPoint, MKMapSize

• Geografische Koordinaten:

•Merkator-Projektions Koordinaten:

Demo

Demo

Clustering

PlaneFinder

Dummy Screen

Wohin?

Dummy Screen

CarJump

Dummy Screen

Car2Go

Dummy Screen

(OCMapView?)

Öffnungszeiten

Dummy Screen

(Superpin)

Öffnungszeiten

Dummy Screen

(Superpin)

RailTime

Dummy Screen

(ADClusterMapView)

Fotos

Dummy Screen

Anforderungen

• Client-seitiges Clustering

• Schneller Algorithmus, aber trotzdem einfach zu verstehen

• Kein Popping

• Kein Grideffekt

• Ähnlich Fotos App

WWDC 2011/Session 111

Clustering Algorithmus I

Zellengröße

Clustering Algorithmus II

Clustering Algorithmus III

Überhang

Demo

Demo

iOS 7

Rotation und 3D

Rotation

[MKMapView visibleMapRect]

Demo

Demo

Animationen

Fotos

Dummy Screen

CarJump

Dummy Screen

Demo

Demo

Ausblick

KingPin

Google SDK

Sonstiges

• Semantischer Zoom

•Offline sync

• Active culling

• Merkator-Projektion http://commons.wikimedia.org/wiki/File:Mercator-proj.png von Jecowa (modified) (CC BY-SA)

• Azimutalprojektion http://commons.wikimedia.org/wiki/File:Azimutalprojektion-transversal_kl.jpg von Stefan Kühn (CC BY-SA)

• WWDC 2011 http://www.flickr.com/photos/kalleboo/5797720966/ von Karl Baron (CC BY)

• Google Maps SDK https://developers.google.com/maps/documentation/ios/ von Google (CC BY)

• Alle anderen Bilder und Videos von Claus Höfele (CC BY)

Quellenangaben

Fragen?https://github.com/optionu/stolpersteine-ios

Macoun⌘