SlideShare a Scribd company logo
Location and Map
API in Windows
Phone 8
SENTHIL KUMAR B
TRIVIUM ESOLUTIONS PVT LTD.
About me
Work for Trivium eSolutions , Bangalore
BDotNetter
Windows Phone Enthusiast
Blogs about Mobile development at
MobileOSGeek.com
Twitter : @isenthil
Agenda
Introduction to Location Providers
WinPRT Location API
Get the WP8’s Current Location
Location Tracking
Map Control
Built in Maps App - Show Location , Directions , Download
Maps for Offline Use.
Q&A
Location Providers
WinPRT Location API
Geolocator
Nokia Maps and New Map control
Managed and Native Code
Converges with Windows 8
Background Location tracking
Demo – Location in WP7.5
Geolocator
Used by your app to monitor the location of the phone.
Properties
DesiredAccuracy
DesiredAccuracyInMeters
MovementThreshhold
etc
Events
PositionChanged
StatusChanged
How to Get Current Phone
Location in WP8 ?
Geolocator geolocator = new Geolocator();
Geoposition myLocation = await
geolocator.GetGeopositionAsync();
var latitude =
myLocation.Coordinate.Latitude;
var longitude =
myLocation.Coordinate.Longitude;
Capabilities for Geolocator
Location and WP8 Emulator
Demo – Geolocator in WP8
Background Location Tracking
Location Tracking in Manifest File.
<DefaultTask Name="_default"
NavigationPage="MainPage.xaml" >
<BackgroundExecution>
<ExecutionType Name="LocationTracking" />
</BackgroundExecution >
</DefaultTask>
Demo
Built-In Map App
MapsTask
Launches the Maps application
Search string and find locations on map
MapsDirectionTask
Launch the Maps application and display driving directions between two
points.
MapsDownloaderTask
Lets the users download a map for offline use.
MapUpdaterTask
lets users check for updates to a map that they have previously
downloaded for offline use.
Demo – Built-in Maps App
Maps APIs on Windows Phone 8
<Grid x:Name="ContentPanel" >
<maps:Map x:Name="MyMap"/>
</Grid>
private void CreateMap()
{
Map MyMap = new Map();
ContentPanel.Children.Add(MyMap);
}
Map Control
Capabilities for Maps
Map Properties and Features
Cartographic mode
Aerial
Hybrid
Road
Terrain
Color Modes
Dark
Light
Maps - Demo
Resources
Windows Phone 8 Training Kit
Windows Phone Dev Center
Microsoft Virtual Academy
Q&A

More Related Content

Location and map api in windows phone 8