1 / 18

Bing Maps and Location Services

Bing Maps and Location Services. Rob S. Miles | Microsoft MVP | University of Hull, UK Andy Wigley | Microsoft MVP | Appa Mundi . Session 7.0. Course Schedule. Session 1 – Tuesday, August 23, 2011 Building Windows Phone Apps with Visual Studio 2010

layne
Télécharger la présentation

Bing Maps and Location Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bing Maps and Location Services Rob S. Miles | Microsoft MVP | University of Hull, UK Andy Wigley | Microsoft MVP | Appa Mundi Session 7.0

  2. Course Schedule • Session 1 – Tuesday, August 23, 2011 • Building Windows Phone Apps with Visual Studio 2010 • Silverlight on Windows Phone—Introduction • Silverlight on Windows Phone—Advanced • Using Expression to Build Windows Phone Interfaces • Windows Phone Fast Application Switching • Windows Phone Multi-tasking & Background Tasks • Using Windows Phone Resources (Bing Maps, Camera, etc.) • Session 2 – Wednesday, August 24, 2011 • XNA for Windows Phone • Application Data Storage on Windows Phone • Using Networks with Windows Phone • Using Windows Azure with Windows Phone • Tiles & Notifications on Windows Phone • Selling a Windows Phone Application

  3. Topics Silverlight overview The Metro design style Silverlight Components Creating a Silverlight Application Silverlight and XAML Introduction to Silverlight Layout Components and Events

  4. Location Services

  5. Features Smart device + cloud service Balance accuracy with time & power Consistent API across platforms

  6. Location Sources GPS + Accuracy - Power - Speed - Indoors - Accuracy + Power + Speed - Wilderness WiFi +/- Accuracy +/- Power +/- Speed +/- Urban areas Location Services Cell Towers

  7. Code and API // Initialize the GeoCoordinateWatcher. watcher = newGeoCoordinateWatcher(GeoPositionAccuracy.High); watcher.MovementThreshold= 0.5; // Reduce 'noise' watcher.PositionChanged+= newEventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(watcher_PositionChanged); watcher.StatusChanged+= newEventHandler<GeoPositionStatusChangedEventArgs>(watcher_StatusChanged);

  8. Location on Emulator Windows Phone SDK 7.1 Emulator comes with Location simulator

  9. Location Emulator

  10. Bing Maps

  11. Silverlight Bing Map Control • Full parity with Silverlight Bing Map control http://www.microsoft.com/maps/isdk/Silverlight/ • Optimize for Windows Phone • Touch Enabled • Pinch – zoom in/out • Translate • Caching

  12. Silverlight Maps control

  13. New Bing Maps Launchers in Windows Phone 7.1

  14. BingMapsTask Display.Click += ( o, e ) => { var longitude = Double.Parse(Long.Text);var latitude = Double.Parse(Lat.Text);varbingMapsTask = new BingMapsTask() {Center = new GeoCoordinate( longitude, latitude ),SearchTerm = Search.Text,ZoomLevel = Double.Parse( Zoom.Text ) };bingMapsTask.Show(); }; BingMapsTask makes launching the built-in Bing Maps application easy

  15. BingMapsDirectionsTask // create the task var task = new BingMapsDirectionsTask(); task.Start = new LabeledMapLocation(startLabel, startCoordinate); task.End = new LabeledMapLocation(endLabel, endCoordinate); task.Show(); Launching built-in Bing Maps tasks with directions enabled is trivial too! If you do not specify one of Start or End parameters it defaults missing parameter to your current location Can also specify only the name of a location (but no coordinate) and it will automatically do a geocoding service lookup and display a selection list if multiple matches

  16. BingMapsTask and BingMapsDirectionsTask

  17. Review

More Related