6. Location Service Constraint
•
always check availability of the service
([CLLocationManager locationServicesEnabled])
•
also take a look at authorization status
([CLLocationManager authorizationStatus])
•
if app requires retrieving location add
UIRequiredDeviceCapabilities key to Info.plist
(value location-services and/or gps)
!6
7. The Significant-Change Location Service
•
low power way of tracking location changes
•
requires built-in cellular radio
•
availability starts from iOS 4
!7
8. Region Monitoring
•
you can not monitor infinite number of regions
•
number of monitored regions is limited for the
app to 20
•
notifications on enter and exit region
•
margin distance before notifying about entering/
exiting a region
!8
9. Time for code show
Code for this presentation is available on GitHub:
https://github.com/JulianKrol/maps_presentation
!9
13. Almighty
MKOverlayRenderer
•
draws a visual effect of an overlay it contain
(id<MKOverlay>)
•
subclasses overrides
drawMapRect:zoomScale:inContext:
•
has a few subclasses (MKTileOverlayRenderer,
MKOverlayPathRenderer —> three more)
!13
15. More info about Maps
•
https://developer.apple.com/library/ios/
documentation/userexperience/conceptual/
LocationAwarenessPG/MapKit/MapKit.html
•
https://www.captechconsulting.com/blog/ericstroh/ios-7-tutorial-series-map-kit
•
https://developer.apple.com/library/ios/
documentation/userexperience/conceptual/
LocationAwarenessPG/AnnotatingMaps/
AnnotatingMaps.html
!15
16. For even more involved
•
Google Maps for iOS https://developers.google.com/maps/
documentation/ios/
•
MapQuest http://developer.mapquest.com
•
Spatial database (example) http://postgis.net
!16