Download - Windows Phone 7 Bing Maps Control
![Page 1: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/1.jpg)
Bing Maps for Windows Phone 7Chris Pendleton(Ex) Bing Maps Technical EvangelistMicrosoft Corporation@ChrisPendleton
![Page 2: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/2.jpg)
Agenda
Bing Maps – Content– APIs– Infrastructure
Windows Phone 7 Control– Classes– Coding
Q&A
![Page 3: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/3.jpg)
Content: Geocoding
Over 85 million parcel centroids in US Parcel centroids in Japan and
Germany now live Parcels provide a high level of
accuracy Falls back to interpolation Bulk geocoding available No daily limits on geocoding
![Page 4: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/4.jpg)
Content: Maps
Road data mostly from NAVTEQ. Highway or Capital coverage for
every country in the world; street level data for 37 countries
Full Bing list of coverage.
![Page 5: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/5.jpg)
Content: Maps
New Map Style
![Page 6: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/6.jpg)
Content: Aerial
Uses a combination of satellite and aerial photos up to 12 inches per pixel.
Flying Global Ortho Project to provide 12 inch resolution photos for all 48 lower states and W. Europe
Refresh rate every 2-3 years Partner: Digital Globe
![Page 7: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/7.jpg)
Content: Routing
Shortest, fastest, walking and traffic-based
Offers route geometry for spatial queries
![Page 8: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/8.jpg)
Content: Search
Yellow Page listings available via map API
Nearly 20 million listings available
![Page 9: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/9.jpg)
Developer APIs
AJAX API Silverlight Control SOAP Service ReST Service Bing Map App API Spatial Data API
![Page 10: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/10.jpg)
Infrastructure
Content (tiles and controls) worldwide deployment across Azure Content Delivery Network
Services deployed across Azure Dynamic Compute Network
![Page 11: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/11.jpg)
Windows Phone 7 Bing Maps Control
Native to WP7 SDK (Woohoo!) Based on Bing Maps Silverlight
Control Some features removed (for perf) Some features added (for device) Some class changes (for conflict)
![Page 12: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/12.jpg)
New Classes
Class Features
MapAutomationPeer Handlers for interacting with the device - DoubleTap, Drag, Flick, Scale, Zoom
MapDragEventsArgs Measures screen distance - DragDelta
MapFlickEventArgs Measures screen distance - Velocity
MapInputEventArgs Map events – Handled, ViewportPoint
MapZoomEventArgs Touch zoom events – ZoomDelta
MatrixHelper Device movements – Rotate, Rotate at, Translate
Overlay Controls atop the map – FireTemplateApplied, TemplateApplied
ZoomBar Controls the zoom bar – OnApplyTemplate, OnZoomMap, ZoomMap
![Page 13: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/13.jpg)
Maps.Platform Classes
Class Features
Location Defines lat/lon
Rectangle Northeast and Southwest map corners
ShapeBase Serialization
![Page 14: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/14.jpg)
Setting Centerpoint (C#)
using Microsoft.Phone.Controls.Maps;using System.Device.Location;
namespace WindowsPhoneApplication1{ public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); map1.SetView(new GeoCoordinate(42.123, -120.123), 17); }}}
![Page 15: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/15.jpg)
Change Map Styles (C#)
using Microsoft.Phone.Controls.Maps;using System.Device.Location;
namespace WindowsPhoneApplication1{… private void button1_Click(object sender, RoutedEventArgs e) {
if (map1.Mode is RoadMode) { map1.Mode = new AerialMode(true); } else { map1.Mode = new RoadMode(); } }…}
![Page 16: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/16.jpg)
Set Map Properties (XAML)
… xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps">
<!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock x:Name="ApplicationTitle" Text="CP's Mapplication" Style="{StaticResource PhoneTextNormalStyle}"/> <TextBlock x:Name="PageTitle" Text="My Maps!" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> </StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<my:Map Height="503" HorizontalAlignment="Left" Margin="9,6,0,0" Name="map1" VerticalAlignment="Top" Width="447" ZoomBarVisibility="Visible" Mode="Aerial" CredentialsProvider=“[BINGMAPSKEY]"/> <Button Content="Switch Map Styles" Height="72" HorizontalAlignment="Left" Margin="69,534,0,0" Name="button1" VerticalAlignment="Top" Width="337" Click="button1_Click" /> </Grid> </Grid>
![Page 17: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/17.jpg)
Hello World
1. Load Map
![Page 18: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/18.jpg)
Switch Map Modes
1. Loads Map Control2. Specifies Center Point3. Specifies Map Mode4. Button switches map
style
![Page 19: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/19.jpg)
Locate Me Using GPS
1. Load Map2. Access GPS3. Re-center and Zoom
Map
![Page 20: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/20.jpg)
Using Shapes
1. Load Map2. Re-center and Zoom
Map3. Draw Polygon
![Page 21: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/21.jpg)
Which API is Right for You?
Surface
Mobile
PC
Browser
AJAX Map Control
Silverlight Control
SOAP Services
REST Services
Map App SDK
Bing
Map
s Pl
atfor
m
Customer Servers
End User
www.bing.com/maps
MapPoint Web Services
+ Data Source
![Page 22: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/22.jpg)
Next Steps
Download WP7 SDK Get a Bing Maps Key at
BingMapsPortal.com Reference the WP7 Docs Reference the Bing Maps Silverlight
Control docs Build a killer app!
![Page 23: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/23.jpg)
Q&A
Yes, it’s free for native mobile apps (all platforms)
Yes, it’s free on the web…for the most of you
Yes, it’s free for education and NFP It’s all free unless…you exceed usage
thresholds on the web
![Page 24: Windows Phone 7 Bing Maps Control](https://reader033.vdocuments.us/reader033/viewer/2022060109/55561cd0d8b42ae0238b51bb/html5/thumbnails/24.jpg)
© 2010 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.