Download - Location and map api in windows phone 8
![Page 1: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/1.jpg)
Location and Map API in Windows Phone 8SENTHIL KUMAR B
TRIVIUM ESOLUTIONS PVT LTD.
![Page 2: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/2.jpg)
About me
Work for Trivium eSolutions , Bangalore
BDotNetter
Windows Phone Enthusiast
Blogs about Mobile development at MobileOSGeek.com
Twitter : @isenthil
![Page 3: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/3.jpg)
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
![Page 4: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/4.jpg)
Location Providers
![Page 5: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/5.jpg)
WinPRT Location API
Geolocator
Nokia Maps and New Map control
Managed and Native Code
Converges with Windows 8
Background Location tracking
![Page 6: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/6.jpg)
Demo – Location in WP7.5
![Page 7: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/7.jpg)
Geolocator
Used by your app to monitor the location of the phone.
Properties DesiredAccuracy
DesiredAccuracyInMeters
MovementThreshhold
etc
EventsPositionChanged
StatusChanged
![Page 8: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/8.jpg)
How to Get Current Phone Location in WP8 ?Geolocator geolocator = new Geolocator();
Geoposition myLocation = awaitgeolocator.GetGeopositionAsync();
var latitude = myLocation.Coordinate.Latitude;
var longitude = myLocation.Coordinate.Longitude;
![Page 9: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/9.jpg)
Capabilities for Geolocator
![Page 10: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/10.jpg)
Location and WP8 Emulator
![Page 11: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/11.jpg)
Demo – Geolocator in WP8
![Page 12: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/12.jpg)
Background Location Tracking
Location Tracking in Manifest File.
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" ><BackgroundExecution><ExecutionType Name="LocationTracking" /></BackgroundExecution ></DefaultTask>
Demo
![Page 13: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/13.jpg)
Built-In Map App
MapsTaskLaunches the Maps application
Search string and find locations on map
MapsDirectionTaskLaunch the Maps application and display driving directions between two
points.
MapsDownloaderTaskLets 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.
![Page 14: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/14.jpg)
Demo – Built-in Maps App
![Page 15: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/15.jpg)
Maps APIs on Windows Phone 8
![Page 16: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/16.jpg)
<Grid x:Name="ContentPanel" ><maps:Map x:Name="MyMap"/>
</Grid>
private void CreateMap(){
Map MyMap = new Map();ContentPanel.Children.Add(MyMap);
}
Map Control
![Page 17: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/17.jpg)
Capabilities for Maps
![Page 18: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/18.jpg)
Map Properties and FeaturesCartographic mode
Aerial
Hybrid
Road
Terrain
Color ModesDark
Light
![Page 19: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/19.jpg)
Maps - Demo
![Page 20: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/20.jpg)
Resources
Windows Phone 8 Training Kit
Windows Phone Dev Center
Microsoft Virtual Academy
![Page 21: Location and map api in windows phone 8](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c722354a7959dc6f8b45cd/html5/thumbnails/21.jpg)
Q&A