IPhone
• IPhone OS 2.2.1
• IPhone OS 3.0 CENSORED
• Geolocation
• Map URI
• Simulator
CoreLocation
• Uses the available hardware to triangulate
the user’s position based on nearby GPS,
cell, or WiFi signal information
CoreLocation
• Add the framework to your project
• #import <CoreLocation/CoreLocation.h>
• CLLocation
• CLLocationManager
• CLLocationManagerDelegate (protocol)
CLLocation
• coordinate (CLLocationCoordinate2D)
• altitude (in feet x 3.28)
• verticalAccuracy
• horizontalAccuracy
• speed
• course (degrees clockwise from north)
• getDistanceFrom:(CLLocation *)location
CLLocationManager
• CLLocationManager::distanceFilter
• CLLocationManager::desiredAccuracy
• best, nearestTenMeters, hundredMeters,
kilometer, threeKilometers
• Accuracy improves over time as it will
return the first location ASAP
Map URI
• Launch applications with special URIs
• UIApplication::openURL(NSURL)
• http://maps.google.com/maps?
q=bar&ll=-33.874559,151.219575
URL Querystring
• q - The query parameter. Could be a KML file.
• near - The location part of the query.
• ll - Latitude and longitude (decimal format, comma separated) for the map center point.
• sll - The latitude and longitude points from which a business search should be performed.
• spn - The approximate latitude and longitude span.
• sspn - A custom latitude and longitude span format used by Google.
• t - The type of map to display.
• z - The zoom level.
• saddr - The source address, which is used when generating driving directions
• daddr - The destination address, which is used when generating driving directions.
• latlng - A custom ID format that Google uses for identifying businesses.
• cid - A custom ID format that Google uses for identifying businesses.
Simulator
• Good luck
• Only GPS location?
• 1 Infinite Loop, Cupertino, CA, 95014
Simulator
• Good luck
• Only GPS location?
• 1 Infinite Loop, Cupertino, CA, 95014
Summary
• Get lat/lng from GPS, Wifi or Cell towers
• Launch maps (query, points, directions)
• Simulator leaves much to be desired
Map Intent
• “Intents” are how Android apps launch
other apps
• Supports special GEO URI
• geo:38.899533,-77.036476
Geocode
• getFromLocation
• getFromLocationName
MapView
• setBuiltInZoomControl()
• getController
MapController
• setCenter
• setZoom
Simulator
• Great
• DDMS Perspective in Eclipse
• Simulate single GPS location or provide a
KML file
Summary
• Get direction/heading information
• Get lat/lng from GPS, Wifi or Cell towers
• Launch maps (query, points, directions)
• Geocoding lat/lng to/from address
• Embed maps through MapView
• Simulator very extensive
JavaScript API
• window.BlackBerry.BlackBerryLocation
• latitude
• longitude
• onLocationUpdate()
PhoneGap
• Write apps with HTML/JS/CSS, access
native APIs, deploy to multiple platforms.
• Built at IPhoneDevCamp
• Web2.0 LaunchPad winner
• IPhone, Android, BlackBerry
• “The purpose of PhoneGap is for
PhoneGap to not exist”
Standards
• W3C
• http://dev.w3.org/geo/api/spec-source.html
• http://www.w3.org/TR/widgets-apis/
• Firefox 3.5 and Fennec
• Android WebKit (Gears)
• Opera X
• Another popular version of WebKit
• Internet Explorer Mobile (Gears)
• RIM ... ummm forget about it
0 comments
Post a comment