Bing maps for windows store apps
This presentation is the property of its rightful owner.
Sponsored Links
1 / 26

Bing Maps for Windows Store Apps PowerPoint PPT Presentation


  • 263 Views
  • Uploaded on
  • Presentation posted in: General

Bing Maps for Windows Store Apps. Chris Pendleton Sr. Program Manager, Lead 3-133. Agenda. Bing Maps on Windows 8 Bing Maps for JavaScript Bing Maps for Managed & Native Code Application Protocol Handling Licensing Q&A. Bing Maps on Windows 8. Demo: Bing Maps Application.

Download Presentation

Bing Maps for Windows Store Apps

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Bing maps for windows store apps

Bing Maps for Windows Store Apps

Chris Pendleton

Sr. Program Manager, Lead

3-133


Agenda

Agenda

  • Bing Maps on Windows 8

  • Bing Maps for JavaScript

  • Bing Maps for Managed & Native Code

  • Application Protocol Handling

  • Licensing

  • Q&A


Bing maps on windows 8

Bing Maps on Windows 8


Demo bing maps application

Demo: Bing Maps Application


Bing maps for javascript

Bing Maps for JavaScript


Bing maps for javascript1

Bing Maps for JavaScript

  • Supported by Bing Maps AJAX Map Control

  • Modular Approach

  • Maps, Pins, Lines, Polygons

  • Modules: Search, Venue Maps, Advanced Shapes, etc.

  • Integration with Bing Maps Web Services

    • Geocoding

    • Routing

    • Search

    • Spatial Data Services


Demo hello world

Demo: Hello World


Code walkthrough

Code Walkthrough

<!-- Bing Map Control references --> <script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"></script>

Microsoft.Maps.loadModule('Microsoft.Maps.Map', { callback: initMap, culture: en-us, homeRegion: US});

function initMap()

{ var map; varmapOptions = { credentials: "INSERT_YOUR_BING_MAPS_KEY" };

map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions); }


Demo bing maps twitter

Demo: Bing Maps & Twitter


Code walkthrough1

Code Walkthrough

  • function GetMap()

  • {

  • // Initialize the map

  • map = new Microsoft.Maps.Map(document.getElementById("myMap"), {credentials:"Bing Maps Key"});

  • // Retrieve the location of the map center var center =

  • map.getCenter();

  • // Add a pin to the center of the map

  • varpin = new Microsoft.Maps.Pushpin(center, {draggable: true});

  • // Add a handler to the pushpin drag

  • Microsoft.Maps.Events.addHandler(pin, 'mouseup', DisplayLoc); map.entities.push(pin);

  • }

  • DO not use EVAL – Apps will be rejected. Use Winjs.XHR (XML HTTP Request) - for calling web services


Bing maps for managed native

Bing Maps for Managed & Native


Bing maps for managed native1

Bing Maps for Managed & Native

  • Supports Managed and Native Code

  • Methods – Maps, Pins, Lines, Polygons, Layers

  • Events – LandmarkTapped, MapStyleChanged, etc.

  • Modules – Venue Maps

  • Integration with Bing Maps Web Services

    • Geocoding

    • Routing

    • Search

    • Spatial Data Service


Demo hello world1

Demo: Hello World


Code walkthrough2

Code Walkthrough

  • <Page x:Class="Application1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Application1" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:bm="using:Bing.Maps" mc:Ignorable="d">

  • <Grid Background="{StaticResourceApplicationPageBackgroundBrush}">

  • <bm:Map credentials="INSERT_YOUR_BING_MAPS_KEY" x:Name="myMap" MapType="Aerial" ZoomLevel="12">

  • <bm:Map.Center>

  • <bm:Location Latitude="46.227480" Longitude="-122.192955" />

  • </bm:Map.Center>

  • </bm:Map>

  • </Grid>

  • </Page>


Demo shapes

Demo: Shapes


Code walkthrough3

Code Walkthrough

MapShapeLayershapeLayer = new MapShapeLayer();

MapPolygonpolygon = new MapPolygon();

polygon.Locations= new LocationCollection()

{ new Location(44, -107), new Location(44, -110), new Location(46, -110), new Location(46, -107) };

polygon.FillColor= Windows.UI.Colors.Red; shapeLayer.Shapes.Add(polygon);

map.ShapeLayers.Add(shapeLayer);


Application protocol handling

Application Protocol Handling


Application protocol handling1

Application Protocol Handling

  • Allows you to link from any app to the Bing Maps App

  • Use BingMaps:

    • Set Centerpoint

    • Geocode a Location

    • Search the Map

    • Set map style and zoom level

    • Overlay traffic

    • Generate a route


Code walkthrough search

Code Walkthrough: Search

bingmaps:?q=coffee&where=Seattle


Demo travel to bing maps

Demo: Travel to Bing Maps


Code walkthrough collections

Code Walkthrough: Collections

bingmaps:?collection=name.My%20Main%20Campus%20Landmarks~point.47.639621_-122.127212_Big%20Fountain~point.47.641974_-122.129621_Sports%20Fields~point.47.641338_-122.123082_Walking%20Trail~point.47.639828_-122.130360_Flag%20Poles


Licensing

Licensing


Licensing1

Licensing

  • Bing Maps is Free for Windows 8

  • As follows:

    • Allotment of up to 50,000 cumulative billable transactions as defined in the SDKs, within any 24 hour period

    • Evaluation for Commercial, Non-Commercial or Government Use: allotment of up to 10,000 cumulative billable transactions as defined in the SDKs, in any 30 day period. 

    • SDS: Up to 5 batch geocoding or file uploads with of up to 50 records each, using the Bing Spatial Data Services API, within any 24 hour period.   

    • Cannot be used in connection with Windows Store Apps Company Applications used by authenticated enterprise users (employees or agents of the enterprise) over a private network without a Bing Maps Agreement

  • Questions: [email protected]


Resources

Resources

  • Bing Maps: Microsoft.com/Maps

  • Bing Maps Keys: BingMapsPortal.com

  • See – “Security in Windows Store apps” session

  • Bing Maps Terms of Use: http://www.microsoft.com/maps/product/terms.html

  • Bing Maps Licensing: Microsoft.com/Maps

  • Bing Maps for Windows Store Apps SDK: http://msdn.microsoft.com/en-us/library/hh846481.aspx

  • Bing Maps Application Protocol Handler: http://msdn.microsoft.com/en-us/library/windows/apps/jj635237.aspx

  • Contact: [email protected]


Resources1

Resources

  • Develop: http://msdn.microsoft.com/en-US/windows/apps/br229512

  • Design: http://design.windows.com/

  • Samples: http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-Samples

  • Videos: http://channel9.msdn.com/Windows

Please submit session evals by using the Build Windows 8 app

or at http://aka.ms/BuildSessions


  • Login