SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 
Where20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialWhere20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialShoaib Burq
 
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
 

Semelhante a 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
 
Where20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialWhere20 2008 Ruby Tutorial
Where20 2008 Ruby Tutorial
 
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
 

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Getting Oriented with MapKit