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

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)

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
 
Advanced SQL Selects
Advanced SQL SelectsAdvanced SQL Selects
Advanced SQL Selects
 

Último

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 

Getting Oriented with MapKit