SlideShare une entreprise Scribd logo
1  sur  34
Getting Oriented with
       MapKit
          Julio Barros
     Julio@E-String.com
Why Maps?

• iPhone is a mobile / pocket computer
• Where am I?
• How do I get somewhere?
• What’s near me?

                Julio Barros E-String.com
Dark ages (pre 3.0)
• Static map images
• Web view with Javascript shenanigans
• Exit out to google maps


                Julio Barros E-String.com
MapKit
• New in iPhone 3.x
• Embed map in your app
• Uses Google map tiles
• Familiar map UI

              Julio Barros E-String.com
Important Classes
MKMapView


MKAnnotation (protocol)


MKAnnotationView

              Julio Barros E-String.com
Important Classes
MKMapView
   MKMapViewDelegate
MKAnnotation (protocol)


MKAnnotationView
   MKPinAnnotationView
              Julio Barros E-String.com
Simplest Example

• MKMapView ... just a view


• Or use Interface Builder
• Don’t forget to add mapkit framework
                Julio Barros E-String.com
That was
  easy




       Julio Barros E-String.com
Show User
 Location




      Julio Barros E-String.com
Showing a
particular area on
     the map
               Latitude Span
     Center



“best fit” not exactly
    what you set
                                                Longitude Span
                    Julio Barros E-String.com
Regions
• MKCoordinateRegion




              Julio Barros E-String.com
Denver,
Colorado




      Julio Barros E-String.com
Demo data
plist of Brewery information: name, address,
latitude, longitude




               Julio Barros E-String.com
Loading Demo Data




      Julio Barros E-String.com
Local area




        Julio Barros E-String.com
MKAnnotation




   Julio Barros E-String.com
MyAnnotation Class




      Julio Barros E-String.com
Adding Annotations




      Julio Barros E-String.com
Default Pins at
 annotations




          Julio Barros E-String.com
Customizing pins
• MKPinAnnotationView
• MKMapViewDelegate - set a delegate




               Julio Barros E-String.com
Our purple
  pins




        Julio Barros E-String.com
Custom markers
• MKAnnotationView




             Julio Barros E-String.com
Customizing
 the view



        Julio Barros E-String.com
Customizing the
    Callout




    Julio Barros E-String.com
Tapping the call out
       view




       Julio Barros E-String.com
Reverse Geocoding

• Geocoding : address to coordinates
 • geocoder.us other services
• Reverse geocoding : coordinates to address


               Julio Barros E-String.com
MKReverseGeocoder




      Julio Barros E-String.com
MKPlacemark
• Address info including, country code,
  country, postal code, administrative area,
  sub administrative area, locality, sub locality,
  thoroughfare, sub thoroughfare
• Conforms to MKAnnotation
• Has address dictionary with Address Book
  keys

                 Julio Barros E-String.com
Number of pins
• Try to limit
  annotations to ~100(?)
• Implement region
  change delegate
  methods
• Create and manage
  your own clusters


                    Julio Barros E-String.com
Challenges
• Anchoring an object to a location on the
  map and having it scale.
• Shapes - neighborhoods
• Lines - routes / paths
• View space to Geo Space
  - (CGPoint)convertCoordinate:(CLLocationCoordinate2D)
  coordinate toPointToView:(UIView *)view
  - (CLLocationCoordinate2D)convertPoint:(CGPoint)point
  toCoordinateFromView:(UIView *)view
                       Julio Barros E-String.com
Legal limitations
I’m not a lawyer but think carefully before using this
for:
   vehicle/fleet tracking
   routing
   cacheing tiles
   geocoding / mass reverse geocoding
Read the TOS
   http://code.google.com/apis/maps/iphone/
   terms.html        Julio Barros E-String.com
Possible Options

• OpenStreetMap.org (OSM) - map/tile data
• Route-Me - OSS map view
• Cloudemade.com - services around OSM
• geocoder.us (among others)

               Julio Barros E-String.com
Resources

• MapKit Framework Reference - Apple
• Using Map Kit with Bill Dudney - PragProg
• Using Map Kit ... Bill Dudney - Wednesday

                Julio Barros E-String.com
Thank You
Julio Barros
Julio@E-String.com
http://www.E-String.com
http://twitter.com/JulioBarros
Also on Face book and Linked In


                Julio Barros E-String.com

Contenu connexe

Similaire à Getting Oriented with MapKit

SQLBits X SQL Server 2012 Spatial
SQLBits X SQL Server 2012 SpatialSQLBits X SQL Server 2012 Spatial
SQLBits X SQL Server 2012 SpatialMichael Rys
 
Web Mashup Slides For Lesson 1
Web Mashup Slides For Lesson 1Web Mashup Slides For Lesson 1
Web Mashup Slides For Lesson 1Alvin Chua
 
GeoClue - State of the Map 2007
GeoClue - State of the Map 2007GeoClue - State of the Map 2007
GeoClue - State of the Map 2007Andrew Turner
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersJody Garnett
 
Intro GIS.pptx
Intro GIS.pptxIntro GIS.pptx
Intro GIS.pptxSamiDan2
 
Mining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMatthew Russell
 
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...DevClub_lv
 
Game Design 2 (2010): Lecture 7 - Micro and Macro Design
Game Design 2 (2010): Lecture 7 - Micro and Macro DesignGame Design 2 (2010): Lecture 7 - Micro and Macro Design
Game Design 2 (2010): Lecture 7 - Micro and Macro DesignDavid Farrell
 
Solving Volume, Velocity, and Variety Challenges with Location
Solving Volume, Velocity, and Variety Challenges with LocationSolving Volume, Velocity, and Variety Challenges with Location
Solving Volume, Velocity, and Variety Challenges with LocationPrecisely
 
Simpósio Brasileiro de Banco de Dados 2005
Simpósio Brasileiro de Banco de Dados 2005Simpósio Brasileiro de Banco de Dados 2005
Simpósio Brasileiro de Banco de Dados 2005Marcirio Chaves
 
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기KwangJin So
 
CTOs Perspective on Adding Geospatial and Location-based Information
CTOs Perspective on Adding Geospatial and Location-based InformationCTOs Perspective on Adding Geospatial and Location-based Information
CTOs Perspective on Adding Geospatial and Location-based InformationBradley Brown
 
MapInfo Pro v2023: The Next Dimension in Spatial Analytics
MapInfo Pro v2023: The Next Dimension in Spatial AnalyticsMapInfo Pro v2023: The Next Dimension in Spatial Analytics
MapInfo Pro v2023: The Next Dimension in Spatial AnalyticsPrecisely
 
Topo na9manual
Topo na9manualTopo na9manual
Topo na9manuallatium
 
RICS CPD Day London - Steven Eglinton - Geospatial BIM
RICS CPD Day London - Steven Eglinton - Geospatial BIMRICS CPD Day London - Steven Eglinton - Geospatial BIM
RICS CPD Day London - Steven Eglinton - Geospatial BIMGeoEnable Limited
 

Similaire à Getting Oriented with MapKit (20)

SQLBits X SQL Server 2012 Spatial
SQLBits X SQL Server 2012 SpatialSQLBits X SQL Server 2012 Spatial
SQLBits X SQL Server 2012 Spatial
 
Web Mashup Slides For Lesson 1
Web Mashup Slides For Lesson 1Web Mashup Slides For Lesson 1
Web Mashup Slides For Lesson 1
 
GeoClue - State of the Map 2007
GeoClue - State of the Map 2007GeoClue - State of the Map 2007
GeoClue - State of the Map 2007
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayers
 
Intro GIS.pptx
Intro GIS.pptxIntro GIS.pptx
Intro GIS.pptx
 
Mining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social Haystack
 
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...
“Accident Reconstruction” by Aleksis Liekna from Scope Technologies at Auto f...
 
Game Design 2 (2010): Lecture 7 - Micro and Macro Design
Game Design 2 (2010): Lecture 7 - Micro and Macro DesignGame Design 2 (2010): Lecture 7 - Micro and Macro Design
Game Design 2 (2010): Lecture 7 - Micro and Macro Design
 
Where 2.0
Where 2.0Where 2.0
Where 2.0
 
Solving Volume, Velocity, and Variety Challenges with Location
Solving Volume, Velocity, and Variety Challenges with LocationSolving Volume, Velocity, and Variety Challenges with Location
Solving Volume, Velocity, and Variety Challenges with Location
 
Get mapping with leaflet js
Get mapping with leaflet jsGet mapping with leaflet js
Get mapping with leaflet js
 
Presentation
PresentationPresentation
Presentation
 
Simpósio Brasileiro de Banco de Dados 2005
Simpósio Brasileiro de Banco de Dados 2005Simpósio Brasileiro de Banco de Dados 2005
Simpósio Brasileiro de Banco de Dados 2005
 
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기
03 인사이트를 줄 수 있는 Google Maps + CartoDB 활용사례 파헤치기
 
CTOs Perspective on Adding Geospatial and Location-based Information
CTOs Perspective on Adding Geospatial and Location-based InformationCTOs Perspective on Adding Geospatial and Location-based Information
CTOs Perspective on Adding Geospatial and Location-based Information
 
MapInfo Pro v2023: The Next Dimension in Spatial Analytics
MapInfo Pro v2023: The Next Dimension in Spatial AnalyticsMapInfo Pro v2023: The Next Dimension in Spatial Analytics
MapInfo Pro v2023: The Next Dimension in Spatial Analytics
 
Topo na9manual
Topo na9manualTopo na9manual
Topo na9manual
 
RICS CPD Day London - Steven Eglinton - Geospatial BIM
RICS CPD Day London - Steven Eglinton - Geospatial BIMRICS CPD Day London - Steven Eglinton - Geospatial BIM
RICS CPD Day London - Steven Eglinton - Geospatial BIM
 
Power BI - Choose your map
Power BI - Choose your mapPower BI - Choose your map
Power BI - Choose your map
 
Advanced SQL Selects
Advanced SQL SelectsAdvanced SQL Selects
Advanced SQL Selects
 

Dernier

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Getting Oriented with MapKit