Location and map api in windows phone 8

Preview:

DESCRIPTION

slides of the BDotnet Webinar "Location and map api in windows phone 8" that was held on July 13 , 2013

Citation preview

Location and Map API in Windows Phone 8SENTHIL 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

EventsPositionChanged

StatusChanged

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;

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

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.

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 FeaturesCartographic mode

Aerial

Hybrid

Road

Terrain

Color ModesDark

Light

Maps - Demo

Q&A

Recommended