<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.bing.com/blogs/utility/feedstylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Maps Blog</title><subtitle type="html">Learn about the latest mapping technologies, Bing Maps features, and fun ways to use maps. </subtitle><id>http://www.bing.com/blogs/Site_Blogs/b/maps/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.bing.com/blogs/Site_Blogs/b/maps/atom.aspx" /><generator uri="http://telligent.com" version="7.1.2.30501">Telligent Community 7.1.2.30501 (Build: 7.1.2.30501)</generator><updated>2013-01-24T09:36:00Z</updated><entry><title>Upcoming Bing Maps Events - Spring 2013</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/22/upcoming-bing-maps-events-spring-2013.aspx" /><link rel="enclosure" type="image/png" length="37008" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-34-13/Bing-_2800_300x180_2900_-Stock.png" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/22/upcoming-bing-maps-events-spring-2013.aspx</id><published>2013-04-22T17:28:00Z</published><updated>2013-04-22T17:28:00Z</updated><content type="html">&lt;p&gt;&lt;span style="font-size: x-large; font-weight: bold;" size="5"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-size: large;" size="4"&gt;Bing Maps Events&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The following events have been organized by the Bing Maps team.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="font-size: medium;" size="3"&gt;Bing Maps Windows Store Apps Developer Event&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: May 10, 2013 @ 9:30am &amp;ndash; 12:30pm&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Microsoft Cardinal Place, Auditorium, 100 Victoria Street, London SW1E 5JL&lt;/p&gt;
&lt;p&gt;Bing Maps would like to invite you to our Windows Store Apps Developer Event. We have some great speakers lined up who will be showcasing some of the latest Apps developed using Microsoft technology whilst detailing the end to end technical build process.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032547101&amp;amp;Culture=en-GB&amp;amp;community=0"&gt;https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032547101&amp;amp;Culture=en-GB&amp;amp;community=0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="font-size: medium;" size="3"&gt;The Power of Bing Maps &amp;amp; CRM&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: May 10, 2013 @ 2:00pm &amp;ndash; 5:00pm&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Microsoft Cardinal Place, Auditorium, 100 Victoria Street, London SW1E 5JL&lt;/p&gt;
&lt;p&gt;Microsoft Bing Maps would like to invite you to our CRM &amp;amp; Mapping event. The objective of this event is to showcase how mapping can add value, driving greater insights from your CRM data. Not only will we be showcasing existing solutions, but also the business and technical advantages and opportunities that mapping and CRM can bring.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032550691&amp;amp;Culture=en-GB&amp;amp;community=0"&gt;https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032550691&amp;amp;Culture=en-GB&amp;amp;community=0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-large;" size="5"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-size: large;" size="4"&gt;Attending Events&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Bing Maps will have a presence at the following events.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="font-size: medium;" size="3"&gt;SQLBits XI&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: May 2&lt;sup&gt;nd&lt;/sup&gt;- 3&lt;sup&gt;rd &lt;/sup&gt;2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: East Midlands Conference Centre, Nottingham, UK&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://sqlbits.com/"&gt;http://sqlbits.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="font-size: medium;" size="3"&gt;GeoDATA&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: May 14, 2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Birmingham, UK&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://www.geoinformationgroup.co.uk/training/geodata"&gt;http://www.geoinformationgroup.co.uk/training/geodata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: May 16, 2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Sheffield, UK&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://www.geoinformationgroup.co.uk/training/geodata"&gt;http://www.geoinformationgroup.co.uk/training/geodata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: June 12, 2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Dublin, IE&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://www.geoinformationgroup.co.uk/training/geodata"&gt;http://www.geoinformationgroup.co.uk/training/geodata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: June 25, 2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Amsterdam, NL&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://www.geoinformationgroup.co.uk/training/geodata"&gt;http://www.geoinformationgroup.co.uk/training/geodata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="font-size: medium;" size="3"&gt;Microsoft Worldwide Partner Conference&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: July 7&lt;sup&gt;th&lt;/sup&gt; &amp;ndash; 11&lt;sup&gt;th &lt;/sup&gt;2013&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location&lt;/b&gt;: Houston, TX&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Register&lt;/b&gt;: &lt;a href="http://www.digitalwpc.com/Pages/Home.aspx"&gt;http://www.digitalwpc.com/Pages/Home.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-large;" size="5"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-large;" size="5"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-size: large;" size="4"&gt;Recent Webcasts&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Below are some of our most recent Bing Maps webcasts that may have slipped your calendar. You can sign-in with your Event Builder registration details to view the resources for each webcast.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?p_event=a7i6k36e&amp;amp;requireprofile=false"&gt;Bing Maps for Windows Store App JavaScript Development&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=h5h2i6&amp;amp;eventid=s6k23o8w"&gt;Native Bing Maps for Windows Store App Development&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=h5h2i6&amp;amp;eventid=g4f67j4x"&gt;Microsoft Location/Geospatial Solutions for Fleet Tracking and Logistics&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=h5h2i6&amp;amp;eventid=u3d39660"&gt;Bing Maps and Dynamics CRM Solutions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=h5h2i6&amp;amp;eventid=k9a3t4p8"&gt;Bing Maps and Sharepoint Solutions for the Enterprise&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693413&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author></entry><entry><title>HTML5 Canvas Pushpins in JavaScript</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/10/html5-canvas-pushpins-in-javascript.aspx" /><link rel="enclosure" type="image/jpeg" length="22995" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-26-63/HTML5_2800_3008180_2900_.jpg" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/10/html5-canvas-pushpins-in-javascript.aspx</id><published>2013-04-10T15:47:00Z</published><updated>2013-04-10T15:47:00Z</updated><content type="html">&lt;p&gt;One of the more interesting features of HTML5 is the canvas elements. The canvas provides us with a feature rich, low level 2D rendering panel and is supported by all the major web browsers.&lt;/p&gt;
&lt;p&gt;In this blog post, we are going to create a Bing Maps module that wraps the standard pushpin class to create a new HTML5 Canvas pushpin class. There are a lot of cool and interesting things we can do with the canvas that would require a lot more work using traditional HTML and JavaScript. By using this module, tasks such as rotating a pushpin or programmatically changing the color can be easily achieved. In this post I will use the Bing Maps V7 AJAX control, but all of the code can be easily reused with the Bing Maps for Windows Store Apps JavaScript control as well.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Creating the Canvas Pushpin module&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;In Bing Maps, pushpins have the ability to render custom HTML content. We can take advantage of this by passing in an HTML5 as the custom HTML5 content into the &lt;a href="http://msdn.microsoft.com/en-us/library/gg427629.aspx"&gt;pushpin options&lt;/a&gt;. Since we cannot access this canvas until it has been rendered, we will want to create a CanvasLayer class which wraps the EntityCollection class and fires and event with an entity is added to render the data on our canvas. We can then create a CanvasPushpin class that takes two parameters: a location to display the canvas on the map and a callback function that will receive a reference to the pushpin and to the context of the HTML5 canvas. After this, we will be able to use the canvas context to draw our data. Take the following code for the module and copy it into a new file called CanvasPushpinModule.js and store it in a folder called scripts.&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #008000;"&gt;/***************************************************************&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* Canvas Pushpin Module&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* This module creates two classes; CanvasLayer and CanvasPushpin &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* The CanvasLayer will render a CanvasPushpin when it is added &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* to the layer. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* The CanvasPushpin creates a custom HTML pushpin that contains &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* an HTML5 canvas. This class takes in two properties; a location &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* and a callback function that renders the HTML5 canvas.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;****************************************************************/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; CanvasLayer, CanvasPushpin;&lt;br /&gt;&lt;br /&gt;(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; canvasIdNumber = 0;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; generateUniqueID() {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; canvasID = &lt;span style="color: #006080;"&gt;'canvasElm'&lt;/span&gt; + canvasIdNumber;&lt;br /&gt;        canvasIdNumber++;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (window[canvasID]) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; generateUniqueID();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; canvasID;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; getCanvas(canvasID) {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; c = document.getElementById(canvasID);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (c) {&lt;br /&gt;            c = c.getContext(&lt;span style="color: #006080;"&gt;"2d"&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; c;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//The canvas layer will render a CanvasPushpin when it is added to the layer. &lt;/span&gt;&lt;br /&gt;    CanvasLayer = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; canvasLayer = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.EntityCollection();&lt;br /&gt;        Microsoft.Maps.Events.addHandler(canvasLayer, &lt;span style="color: #006080;"&gt;'entityadded'&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (e) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (e.entity._canvasID) {&lt;br /&gt;                e.entity._renderCanvas();&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; canvasLayer;&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    CanvasPushpin = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (location, renderCallback) {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; canvasID = generateUniqueID();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pinOptions = {&lt;br /&gt;            htmlContent: &lt;span style="color: #006080;"&gt;'&amp;lt;canvas id="'&lt;/span&gt; + canvasID + &lt;span style="color: #006080;"&gt;'"&amp;gt;&amp;lt;/canvas&amp;gt;'&lt;/span&gt;&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Pushpin(location, pinOptions);&lt;br /&gt;        &lt;br /&gt;        pin._canvasID = canvasID;&lt;br /&gt;&lt;br /&gt;        pin._renderCanvas = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;            renderCallback(pin, getCanvas(pin._canvasID));&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; pin;&lt;br /&gt;    };&lt;br /&gt;})();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;// Call the Module Loaded method&lt;/span&gt;&lt;br /&gt;Microsoft.Maps.moduleLoaded(&lt;span style="color: #006080;"&gt;'CanvasPushpinModule'&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;To implement the module, we will need to load the module. Once it is loaded, we will want to create a CanvasLayer entity collection which we will add our canvas pushpins. Once this layer is created, we can create our CanvasPushpin objects and add them to the layer. We will use the following image and draw it onto the canvas.&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="108" valign="top"&gt;
&lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2664.clip_5F00_image002_5F00_2EE93586.png"&gt;&lt;img width="23" height="36" title="clip_image002" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" alt="clip_image002" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6787.clip_5F00_image002_5F00_thumb_5F00_7C856206.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="108" valign="top"&gt;
&lt;p align="center"&gt;green_pin.png&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;When we put this all together we end up with the following code:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&lt;span style="color: #006080;"&gt;"http://www.w3.org/1999/xhtml"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;      &amp;lt;meta http-equiv=&lt;span style="color: #006080;"&gt;"Content-Type"&lt;/span&gt; content=&lt;span style="color: #006080;"&gt;"text/html; charset=utf-8"&lt;/span&gt; /&amp;gt;&lt;br /&gt;      &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;br /&gt;          &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; map, canvasLayer;&lt;br /&gt;&lt;br /&gt;          &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; GetMap() {&lt;br /&gt;              &lt;span style="color: #008000;"&gt;// Initialize the map&lt;/span&gt;&lt;br /&gt;              map = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Map(document.getElementById(&lt;span style="color: #006080;"&gt;"myMap"&lt;/span&gt;),&lt;br /&gt;              {&lt;br /&gt;                  credentials: &lt;span style="color: #006080;"&gt;"YOUR_BING_MAPS_KEY"&lt;/span&gt;&lt;br /&gt;              });&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: #008000;"&gt;//Register and load the Canvas Pushpin Module&lt;/span&gt;&lt;br /&gt;              Microsoft.Maps.registerModule(&lt;span style="color: #006080;"&gt;"CanvasPushpinModule"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"scripts/CanvasPushpinModule.js"&lt;/span&gt;);&lt;br /&gt;              Microsoft.Maps.loadModule(&lt;span style="color: #006080;"&gt;"CanvasPushpinModule"&lt;/span&gt;, {&lt;br /&gt;                  callback: &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;                      &lt;span style="color: #008000;"&gt;//Create Canvas Entity Collection&lt;/span&gt;&lt;br /&gt;                      canvasLayer = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CanvasLayer();&lt;br /&gt;                      map.entities.push(canvasLayer);&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: #008000;"&gt;//Create the canvas pushpins&lt;/span&gt;&lt;br /&gt;                      createCanvasPins();&lt;br /&gt;              }});&lt;br /&gt;          }&lt;br /&gt;&lt;br /&gt;          &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; createCanvasPins() {&lt;br /&gt;              &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pin, img;&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;&lt;br /&gt;                  &lt;span style="color: #008000;"&gt;//Create a canvas pushpin at a random location&lt;/span&gt;&lt;br /&gt;                  pin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CanvasPushpin(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(Math.random() * 180 - 90, Math.random() * 360 - 180), &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (pin, context) {&lt;br /&gt;                      img = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Image();&lt;br /&gt;                      img.onload = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;                          &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (context) {&lt;br /&gt;                              context.width = img.width;&lt;br /&gt;                              context.height = img.height;&lt;br /&gt;                              context.drawImage(img, 0, 0);&lt;br /&gt;                          }&lt;br /&gt;                      };&lt;br /&gt;                      img.src = &lt;span style="color: #006080;"&gt;'images/green_pin.png'&lt;/span&gt;;&lt;br /&gt;                  });&lt;br /&gt;&lt;br /&gt;                  &lt;span style="color: #008000;"&gt;//Add the pushpin to the Canvas Entity Collection&lt;/span&gt;&lt;br /&gt;                  canvasLayer.push(pin);&lt;br /&gt;              }&lt;br /&gt;          }&lt;br /&gt;      &amp;lt;/script&amp;gt;&lt;br /&gt;   &amp;lt;/head&amp;gt;&lt;br /&gt;   &amp;lt;body onload=&lt;span style="color: #006080;"&gt;"GetMap();"&lt;/span&gt;&amp;gt;&lt;br /&gt;        &amp;lt;div id=&lt;span style="color: #006080;"&gt;'myMap'&lt;/span&gt; style=&lt;span style="color: #006080;"&gt;"position:relative;width:800px;height:600px;"&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;   &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;By using the above code, we will end up with something like this:&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4810.canvasBasic_5F00_50F42783.jpg"&gt;&lt;img width="504" height="378" title="canvasBasic" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="canvasBasic" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8611.canvasBasic_5F00_thumb_5F00_02136224.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;A more colorful pushpin&lt;/b&gt;&lt;/p&gt;
&lt;div&gt;Using the canvas to render an image isn&amp;rsquo;t terribly exciting, especially when we could do the same thing by setting the icon property of the pushpin to point to the image and accomplish the same thing. One common question I&amp;rsquo;ve seen on the Bing Maps forums over the years is &amp;ldquo;How do I change the color of the pushpin?&amp;rdquo;. In the past the answer was always the same; create a new image that is a different color. In Bing Maps Silverlight, WPF and Native Windows Store controls we can change the color programmatically by simply setting the background color. When using this canvas pushpin module we can actually do the same thing. The first thing we will need is a base pushpin that has the color region removed and made transparent. Below is the image we will use in this example:&lt;/div&gt;
&lt;div align="center"&gt;
&lt;table align="center" border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="74" valign="top"&gt;
&lt;blockquote&gt;
&lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2388.transparent_5F00_pin_5F00_66B29004.png"&gt;&lt;img width="25" height="39" title="transparent_pin" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" alt="transparent_pin" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7181.transparent_5F00_pin_5F00_thumb_5F00_118AF417.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="74" valign="top"&gt;
&lt;p align="center"&gt;transparent_pin.png&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;To get this to work nicely, we will want to provide each pin with a color in which we want it to render as. To do this, we can add a metadata property to each pushpin and store our color information in there. The color information itself is a string representation of a color that the HTML5 canvas can understand. This could be a HEX or RGB color. In this example, we will render random colors for each pushpin. When we go to render the pushpin we will want to draw a circle that is the specified color and then overlay our pushpin template overtop. Below is a modified version of the createCanvasPins method that shows how to do this.&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; createCanvasPins() {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pin, img;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Create a canvas pushpin at a random location&lt;/span&gt;&lt;br /&gt;        pin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CanvasPushpin(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(Math.random() * 180 - 90, Math.random() * 360 - 180), &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (pin, context) {&lt;br /&gt;            img = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Image();&lt;br /&gt;            img.onload = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (context) {&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Set the dimensions of the canvas&lt;/span&gt;&lt;br /&gt;                    context.width = img.width;&lt;br /&gt;                    context.height = img.height;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Draw a colored circle behind the pin&lt;/span&gt;&lt;br /&gt;                    context.beginPath();&lt;br /&gt;                    context.arc(13, 13, 11, 0, 2 * Math.PI, &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;);&lt;br /&gt;                    context.fillStyle = pin.Metadata.color;&lt;br /&gt;                    context.fill();&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Draw the pushpin icon&lt;/span&gt;&lt;br /&gt;                    context.drawImage(img, 0, 0);&lt;br /&gt;                }&lt;br /&gt;            };&lt;br /&gt;&lt;br /&gt;            img.src = &lt;span style="color: #006080;"&gt;'images/transparent_pin.png'&lt;/span&gt;;&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Give the pushpin a random color&lt;/span&gt;&lt;br /&gt;        pin.Metadata = {&lt;br /&gt;            color: generateRandomColor()&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Add the pushpin to the Canvas Entity Collection&lt;/span&gt;&lt;br /&gt;        canvasLayer.push(pin);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; generateRandomColor() {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; &lt;span style="color: #006080;"&gt;'rgb('&lt;/span&gt; + Math.round(Math.random() * 255) + &lt;span style="color: #006080;"&gt;','&lt;/span&gt; + Math.round(Math.random() * 255) + &lt;span style="color: #006080;"&gt;','&lt;/span&gt; + Math.round(Math.random() * 255) + &lt;span style="color: #006080;"&gt;')'&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Using the above code we will end up with something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0333.canvasColoredPins_5F00_4890522C.jpg"&gt;&lt;img width="504" height="379" title="canvasColoredPins" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" alt="canvasColoredPins" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7713.canvasColoredPins_5F00_thumb_5F00_2E4FE908.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Rotating a pushpin&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Sometimes it is useful to be able to rotate your pushpin. One of the most common scenarios I have come across for this is to be able to draw arrows on the map that point in a specific direction. Using traditional HTML and JavaScript we would do this in one of two ways. The first method would be to create a bunch of images of arrows pointing in different directions and then choose which ever one is closest to the direction we want. The second method is a bit of a CSS hack involving the use of borders which I talked about in a &lt;a href="http://www.bing.com/community/site_blogs/b/maps/archive/2011/06/07/developer-tip-modular-plug-in-for-customizable-infobox-control.aspx"&gt;past blog post&lt;/a&gt;. When using the HTML5 canvas, we can easily rotate the canvas by translating the canvas to the point we want to rotate about, then rotating the canvas, and translating the canvas back to the original position. One thing we need to take into consideration is that in most cases the dimension of the canvas will need to change as we rotate an image. Think about rotating a rectangle. When rotated by a few degrees, the area the rectangle requires to fit inside the canvas will be larger. When rotating objects on a map, it is useful to know that it is common practice for North to represent a heading of 0 degrees, East to be 90 degrees, South to be 180 degrees and West to be 270 degrees. In this example, we will take the following arrow image and provide and add metadata to the pushpin where we will specify the heading for the arrow to point. And to make things easy, we will make our arrow point up which aligns with the north direction and a heading of 0 degrees.&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="84" valign="top"&gt;
&lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0333.redArrow_5F00_3E0F7E0C.png"&gt;&lt;img width="18" height="24" title="redArrow" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="redArrow" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3187.redArrow_5F00_thumb_5F00_6B909DCF.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="84" valign="top"&gt;
&lt;p align="center"&gt;redArrow.png&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;When we put this all together, we end up with the following code:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; createCanvasPins() {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pin, img;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Create a canvas pushpin at a random location&lt;/span&gt;&lt;br /&gt;        pin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CanvasPushpin(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(Math.random() * 180 - 90, Math.random() * 360 - 180), &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (pin, context) {&lt;br /&gt;            img = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Image();&lt;br /&gt;            img.onload = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (context) {&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Calculate the new dimensions of the the canvas after the image is rotated&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dx = Math.abs(Math.cos(pin.Metadata.heading * Math.PI / 180));&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dy = Math.abs(Math.sin(pin.Metadata.heading * Math.PI / 180));                              &lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; width = Math.round(img.width * dx + img.height * dy);&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; height = Math.round(img.width * dy + img.height * dx);&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Set the dimensions of the canvas&lt;/span&gt;&lt;br /&gt;                    context.width = width;&lt;br /&gt;                    context.height = height;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Offset the canvas such that we will rotate around the center of our arrow&lt;/span&gt;&lt;br /&gt;                    context.translate(width * 0.5, height * 0.5);&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Rotate the canvas by the desired heading&lt;/span&gt;&lt;br /&gt;                    context.rotate(pin.Metadata.heading * Math.PI / 180);&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Return the canvas offset back to it's original position&lt;/span&gt;&lt;br /&gt;                    context.translate(-img.width * 0.5, &amp;ndash;img.height * 0.5);&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #008000;"&gt;//Draw the arrow image&lt;/span&gt;&lt;br /&gt;                    context.drawImage(img, 0, 0);&lt;br /&gt;                }&lt;br /&gt;            };&lt;br /&gt;            img.src = &lt;span style="color: #006080;"&gt;'images/redArrow.png'&lt;/span&gt;;&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Give the pushpin a random heading&lt;/span&gt;&lt;br /&gt;        pin.Metadata = {&lt;br /&gt;            heading: Math.random() * 360&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        canvasLayer.push(pin);&lt;br /&gt;    }&lt;br /&gt;}  &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Using the above code we will end up with something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3463.canvasArrows_5F00_6B246ADA.jpg"&gt;&lt;img width="504" height="379" title="canvasArrows" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" alt="canvasArrows" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0513.canvasArrows_5F00_thumb_5F00_7C94CBB2.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Data Driven pushpins&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Bing Maps is often used in business intelligence applications. One particular type of business intelligence data that users like to overlay on the map are pie charts. The good news is that creating pie charts using a canvas is fairly easily. Each portion of a pie chart will be a percentage of the total of all the data in the pie chart. Let&amp;rsquo;s simply make use of the arc drawing functionality available within the canvas to do this.&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; createCanvasPins() {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; pin;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Define a color for each type of data&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; colorMap = [&lt;span style="color: #006080;"&gt;'red'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'blue'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'green'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'yellow'&lt;/span&gt;];&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; 25; i++) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Create a canvas pushpin at a random location&lt;/span&gt;&lt;br /&gt;        pin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CanvasPushpin(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(Math.random() * 180 - 90, Math.random() * 360 - 180), &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (pin, context) {&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//Calculate the number of slices each pie we can support&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; max = Math.min(pin.Metadata.data.length, colorMap.length);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//Calculate the total of the data in the pie chart&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; total = 0;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; max; i++) {&lt;br /&gt;                total += pin.Metadata.data[i];&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//Draw the pie chart&lt;/span&gt;&lt;br /&gt;            createPieChart(context, total, pin.Metadata.data, colorMap);&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Give the pushpin some data&lt;/span&gt;&lt;br /&gt;        pin.Metadata = {&lt;br /&gt;            data: generateRandomData()&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Add the pushpin to the Canvas Entity Collection&lt;/span&gt;&lt;br /&gt;        canvasLayer.push(pin);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; createPieChart(context, total, data, colorMap) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; radius = 12.5,&lt;br /&gt;        center = { x: 12.5, y: 12.5 },&lt;br /&gt;        lastPosition = 0;&lt;br /&gt;&lt;br /&gt;    context.width = 25;&lt;br /&gt;    context.height = 25;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; data.length; i++) {&lt;br /&gt;        context.fillStyle = colorMap[i];&lt;br /&gt;        context.beginPath();&lt;br /&gt;        context.moveTo(center.x, center.y);&lt;br /&gt;        context.arc(center.x, center.y, radius, lastPosition, lastPosition + (Math.PI * 2 * (data[i] / total)), &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;);&lt;br /&gt;        context.lineTo(center.x, center.y);&lt;br /&gt;        context.fill();&lt;br /&gt;        lastPosition += Math.PI * 2 * (data[i] / total);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; generateRandomData() {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; [Math.random() * 100, Math.random() * 100, Math.random() * 100, Math.random() * 100];&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Using the above code we will end up with something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1602.canvasPieChart_5F00_14B8360E.jpg"&gt;&lt;img width="504" height="377" title="canvasPieChart" style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" alt="canvasPieChart" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2705.canvasPieChart_5F00_thumb_5F00_48EC5F54.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you wanted to take this module even further, you could create pushpins that are animated, or even simulate a 3D object.&lt;/p&gt;
&lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692663&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Windows 8" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Windows+8/default.aspx" /><category term="Bing Maps AJAX Control 7.0" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+AJAX+Control+7-0/default.aspx" /><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /></entry><entry><title>Bing Maps in AutoCAD 2014</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/03/bing-maps-in-autocad-2014.aspx" /><link rel="enclosure" type="image/jpeg" length="26064" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-33-73/Blog.jpg" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/04/03/bing-maps-in-autocad-2014.aspx</id><published>2013-04-03T15:02:00Z</published><updated>2013-04-03T15:02:00Z</updated><content type="html">&lt;p&gt;We are excited to announce that Bing Maps is the default mapping service in Autodesk&amp;rsquo;s AutoCAD 2014 software. For those not familiar with AutoCAD, AutoCAD is Autodesk&amp;rsquo;s flagship software product and is the world&amp;rsquo;s most widely used 3D CAD (computer-aided design) software. Chances are that you use a product or have been in a building, public area or other development that was designed with AutoCAD. AutoCAD and AutoCAD vertical products such as AutoCAD Architecture and AutoCAD Civil 3D, are used in a wide range of industries and by architects, designers and engineers.&lt;/p&gt;
&lt;p&gt;How is Bing Maps used in AutoCAD 2014 and the AutoCAD vertical products? AutoCAD now has a built-in Geolocation feature and allows users to create and enhance their designs with Bing Maps geocoding and map data. Bing Maps inside AutoCAD 2014 brings in location context and results in more accurate and richer designs. The key geolocation workflows in AutoCAD 2014 supported with Bing Maps include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Locate your AutoCAD design in the real-world using Bing Maps geocoding service&lt;/li&gt;
&lt;li&gt;View your AutoCAD design in the real-world high resolution aerial and satellite imagery&lt;/li&gt;
&lt;li&gt;Aggregate and overlay 2D and 3D geolocated data with your AutoCAD designs&lt;/li&gt;
&lt;li&gt;Locate yourself on your AutoCAD design in the field using GPS and Bing Maps&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below are some examples of Bing Maps aerial, satellite, road maps and geocoding services being used in the AutoCAD 2014 products.&lt;/p&gt;
&lt;p&gt;Bing Maps aerial and satellite imagery maps:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/1_5F00_0CEDC5D1.jpg"&gt;&lt;img width="404" height="451" title="1" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="1" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/1_5F00_thumb_5F00_32774332.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bing Maps road maps:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/2_5F00_18A30D03.jpg"&gt;&lt;img width="404" height="451" title="2" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="2" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/2_5F00_thumb_5F00_0581E057.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bing Maps location geocoding:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/3b_5F00_5BA36339.jpg"&gt;&lt;img width="479" height="392" title="3b" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="3b" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/3b_5F00_thumb_5F00_36A5A2C0.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is an example of Bing Maps used in an AutoCAD 2014 design:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/4_5F00_1541755B.jpg"&gt;&lt;img width="604" height="454" title="4" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="4" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/4_5F00_thumb_5F00_2C2046D7.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/5_5F00_0B2CD430.jpg"&gt;&lt;img width="604" height="454" title="5" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="5" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/5_5F00_thumb_5F00_29971519.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, here is a short video that demonstrates how real world location context can be brought into a design using the Bing Maps based Geolocation feature of AutoCAD 2014.&lt;/p&gt;
&lt;div id="Player1Container"&gt;&lt;/div&gt;
&lt;p align="center"&gt;
&lt;script language="javascript" src="http://img.widgets.video.s-msn.com/js/embed.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script language="javascript" type="text/javascript"&gt;// &lt;![CDATA[
Msn.Video.createWidget('Player1Container', 'Player', 580, 386, {"configCsid": "Bing_Marketing", "configName": "player_bing_blog", "v": "cb307c62-6b32-496f-9f47-230e1f9d688c"}, 'Player1');
// ]]&gt;&lt;/script&gt;
&lt;/p&gt;
&lt;p&gt;For more information on AutoCAD 2014, please visit &lt;a href="http://www.autodesk.com/products/autodesk-autocad/overview"&gt;autodesk.com/autocad&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693373&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Data source staging, rollback and more comes to Spatial Data Services</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/29/data-source-staging-rollback-and-more-comes-to-spatial-data-services.aspx" /><link rel="enclosure" type="image/png" length="37008" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-33-71/Bing-_2800_300x180_2900_-Stock.png" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/29/data-source-staging-rollback-and-more-comes-to-spatial-data-services.aspx</id><published>2013-03-29T16:41:21Z</published><updated>2013-03-29T16:41:21Z</updated><content type="html">&lt;p&gt;Bing Maps Spatial Data Services is now giving you even more options for managing and querying your data source entity data. Check out these new features.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Stage your data source before you publish. &lt;/b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg585130.aspx"&gt;Two new data source upload operations&lt;/a&gt; &amp;ndash; CompleteStaging (for overwrites or new data sources) and IncrementalStaging (for updates) &amp;ndash; offer you the opportunity to stage and verify your data source entity data before you publish it. To &lt;a href="http://msdnstage.redmond.corp.microsoft.com/en-us/library/gg585126.aspx"&gt;query&lt;/a&gt; a staged data source, include &lt;i&gt;isStaging=1&lt;/i&gt; in your query URL. When you are ready to publish the data source, use the $commit URL described in &lt;a href="http://msdn.microsoft.com/en-us/library/dn167662.aspx"&gt;Publish a Staged Data Source&lt;/a&gt;. You can also &lt;a href="http://msdn.microsoft.com/en-us/library/gg585124.aspx"&gt;delete&lt;/a&gt; a staged version. [&lt;a href="http://msdn.microsoft.com/en-us/library/gg585128.aspx"&gt;Load Data Source Dataflow&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/gg585126.aspx"&gt;Query API&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dn167662.aspx"&gt;Publish a Staged Data Source&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/gg585124.aspx"&gt;Delete a Data Source&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Rollback to previous data source versions. &lt;/b&gt;Spatial Data Services now keeps up to two previous versions of your data source with the option to &lt;a href="http://msdn.microsoft.com/en-us/library/dn167663.aspx"&gt;rollback your data source&lt;/a&gt; to a previous version in a matter of minutes. You can also &lt;a href="http://msdn.microsoft.com/en-us/library/hh552980.aspx"&gt;download previous versions&lt;/a&gt;. [&lt;a href="http://msdn.microsoft.com/en-us/library/dn167663.aspx"&gt;Rollback a Data Source Dataflow&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/hh552976.aspx"&gt;Download a Data Source Dataflow&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Query near an address by specifying an address string. &lt;/b&gt;You can now &lt;a href="http://msdn.microsoft.com/en-us/library/gg585133.aspx"&gt;query for entities near an address&lt;/a&gt; by specifying the address string and the address is geocoded to get the latitude and longitude for you. [&lt;a href="http://msdn.microsoft.com/en-us/library/gg585133.aspx"&gt;Query by Area&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example: &lt;/strong&gt;This example shows how you can query around an address.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;http://spatial.virtualearth.net/REST/v1/data/20181f26d9e94c81acdf9496133d4f23/FourthCoffeeSample/FourthCoffeeShops?spatialFilter=nearby('1Microsoft Way, Redmond, WA 98052',5)&amp;amp;$filter=IsWifiHotSpot%20eq%201&amp;amp;$select=*,__Distance&amp;amp;key=queryKey&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Note that querying near an address with an address string will incur a geocoding usage transaction (RESTLocations) as well as a Query API transaction (RESTSpatialDataService:Query)&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693371&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="spatial data services" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/spatial+data+services/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Connecting a SharePoint List to Bing Maps</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/26/connecting-a-sharepoint-list-to-bing-maps.aspx" /><link rel="enclosure" type="image/jpeg" length="32553" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-33-33/Blog.jpg" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/26/connecting-a-sharepoint-list-to-bing-maps.aspx</id><published>2013-03-26T15:45:00Z</published><updated>2013-03-26T15:45:00Z</updated><content type="html">&lt;p&gt;I have seen a lot of different ways to integrate Bing Maps with SharePoint. Some more complex than others. In this blog post we will look at an easy way to integrate Bing Maps with SharePoint and connect to a SharePoint list. Many of the things shown in this blog post are not limited to SharePoint Server and can extend to SharePoint Online and Office 365. To give us a jump start, we will reuse the SharePoint list we created in a previous blog titled &lt;a href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/07/geocoding-a-sharepoint-list-item.aspx"&gt;Geocoding a SharePoint List Item&lt;/a&gt;. The content of this post is from a recent webcast I gave and can access online &lt;a href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=w2e54o&amp;amp;eventid=k9a3t4p8"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;Adding Bing Maps to SharePoint&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;Before we dive into the &amp;lsquo;how to&amp;rsquo; we will first demonstrate how simple it is to get Bing Maps into SharePoint. To start off, go to the &lt;a href="http://www.bingmapsportal.com/ISDK/AjaxV7"&gt;Bing Maps V7 Interactive SDK&lt;/a&gt; and go to the &lt;a href="http://www.bingmapsportal.com/ISDK/AjaxV7#TrafficModule2"&gt;Traffic Module sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image002_5F00_1DA74036.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image002" border="0" alt="clip_image002" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image002_5F00_thumb_5F00_33DA0930.png" width="610" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you press the View HTML button on the bottom right corner you can get the full HTML for the example.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image004_5F00_6B1FCEC4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image004" border="0" alt="clip_image004" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image004_5F00_thumb_5F00_37673C99.png" width="584" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Simply open up notepad or any other text editing tool, then copy and paste this code into it. Finally, save the file as &lt;b&gt;TrafficMap.html&lt;/b&gt;. You may also want to add your Bing Maps key to the code to remove the authentication error message that appears on the map. Now open up your SharePoint site and go to your Site Assets folder.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image006_5F00_7B2B4B23.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image006" border="0" alt="clip_image006" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image006_5F00_thumb_5F00_232DD476.png" width="272" height="419" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Take the traffic map webpage you just created and upload it.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image008_5F00_44112150.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image008" border="0" alt="clip_image008" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image008_5F00_thumb_5F00_4D1DACD1.png" width="548" height="164" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once the file is uploaded open up the traffic map in new window to test it out and to get the URL to the file. The webpage should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image010_5F00_46F66036.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image010" border="0" alt="clip_image010" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image010_5F00_thumb_5F00_6BD3D515.png" width="369" height="416" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next, let&amp;rsquo;s will create a new page in our SharePoint site called &lt;b&gt;MyLocationMap&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image012_5F00_2CC208E0.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; margin-left: 0px; margin-right: 0px; padding-top: 0px; border-width: 0px;" title="clip_image012" border="0" alt="clip_image012" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image012_5F00_thumb_5F00_66A125FF.png" width="672" height="273" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you have your page, insert a Page Viewer web part. You can find this under the Media and Content category.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image014_5F00_279F7F97.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; margin-left: 0px; margin-right: 0px; padding-top: 0px; border-width: 0px;" title="clip_image014" border="0" alt="clip_image014" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image014_5F00_thumb_5F00_2B2D74A7.png" width="568" height="359" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now open the tool pane of the Page Viewer web part you just created and add the URL to the traffic map file as the Link property. If you want you can also give the web part a title like &amp;ldquo;Traffic Flow&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image016_5F00_03E305A5.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image016" border="0" alt="clip_image016" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image016_5F00_thumb_5F00_5E496276.png" width="544" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you are done, save the settings and page should refresh and look something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image018_5F00_273F5E70.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image018" border="0" alt="clip_image018" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image018_5F00_thumb_5F00_4FEA9DEC.png" width="499" height="369" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Essentially, the Page Viewer web part has iframed the traffic map web page into the SharePoint site. With only a few minutes of work we were able to easily integrate a simple Bing Maps application with SharePoint.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;Integrating with a SharePoint List&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;There are a few ways to connect to a SharePoint list from code. The two main ways are: use the ECMAScript in SharePoint which has a library for accessing list data or; use the List REST services which exist for all SharePoint lists. In this post we are going to use the ECMAScript method. Here is a good resource on how to &lt;a href="http://msdn.microsoft.com/en-us/library/hh185009(office.14).aspx"&gt;Retrieve Lists Using JavaScript&lt;/a&gt; in SharePoint. If you would rather use the SharePoint List REST services take a look at this &lt;a href="http://msdn.microsoft.com/en-us/library/ff798339.aspx"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To make this code sample more reusable, we will add support for a query string parameter called &lt;i&gt;ListTitle&lt;/i&gt; which will allow us to specify which list we want to connect directly from the URL. As long as the list has a Title, Description, Latitude and Longitude columns this code sample will work. We will also add an infobox control to the map to display the location details when a pushpin is clicked.&lt;/p&gt;
&lt;p&gt;Since we are essentially iframing our web page into a SharePoint page, we will have to call the parent of the iframe to get access to the SharePoint ECMAScripts. Normally this would cause a security exception; however, since our webpage is hosted within the same domain as our SharePoint page, this is allowed. To get access to the parent of the iframe we simply need to call functions in the part using &lt;i&gt;window.parent&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;Open up notepad or any other text editor and add the following code into it. Save the file as &lt;b&gt;MyLocationListMap.html&lt;/b&gt;.&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;!DOCTYPE &lt;span style="color: #0000ff;"&gt;html&lt;/span&gt; PUBLIC "-&lt;span style="color: #008000;"&gt;//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;html&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;head&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;title&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;title&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;meta&lt;/span&gt; http-equiv="Content-Type" &lt;span style="color: #0000ff;"&gt;content&lt;/span&gt;="text&lt;span style="color: #006080;"&gt;/html;&lt;/span&gt; charset=utf-8"/&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;script&lt;/span&gt; type="text/javascript" src="http:&lt;span style="color: #008000;"&gt;//ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;script&lt;/span&gt; type="text/javascript"&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #006080;"&gt;var map, infobox, dataLayer, ctx, listItems, listTitle;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        function getMap()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;map&lt;/span&gt; = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Map&lt;/span&gt;(document&lt;span style="color: #cc6633;"&gt;.getElementById&lt;/span&gt;('myMap'), {&lt;br /&gt;                credentials: 'YOUR_BING_MAPS_KEY'&lt;br /&gt;            });&lt;br /&gt;            &lt;br /&gt;            dataLayer = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.EntityCollection&lt;/span&gt;();&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;map&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.entities&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.push&lt;/span&gt;(dataLayer);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; infoboxLayer = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.EntityCollection&lt;/span&gt;();&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;map&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.entities&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.push&lt;/span&gt;(infoboxLayer);&lt;br /&gt;&lt;br /&gt;            infobox = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Infobox&lt;/span&gt;(new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Location&lt;/span&gt;(0, 0), { &lt;br /&gt;                        visible: false, &lt;br /&gt;                        offset: new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Point&lt;/span&gt;(0, 20) &lt;br /&gt;                    });&lt;br /&gt;            infoboxLayer&lt;span style="color: #cc6633;"&gt;.push&lt;/span&gt;(infobox);&lt;br /&gt;&lt;br /&gt;            listTitle = getQueryStringValue('ListTitle');&lt;br /&gt;            &lt;br /&gt;            if(listTitle){&lt;br /&gt;                window&lt;span style="color: #cc6633;"&gt;.parent&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.ExecuteOrDelayUntilScriptLoaded&lt;/span&gt;(loadList, 'sp&lt;span style="color: #cc6633;"&gt;.js&lt;/span&gt;');&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        function loadList(){&lt;br /&gt;            getListItems(listTitle);            &lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        function getListItems(listTitle){&lt;br /&gt;            ctx = new window&lt;span style="color: #cc6633;"&gt;.parent&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.SP&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.ClientContext&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.get_current&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; targetList = ctx&lt;span style="color: #cc6633;"&gt;.get_web&lt;/span&gt;()&lt;span style="color: #cc6633;"&gt;.get_lists&lt;/span&gt;()&lt;span style="color: #cc6633;"&gt;.getByTitle&lt;/span&gt;(listTitle);&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; query = window&lt;span style="color: #cc6633;"&gt;.parent&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.SP&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.CamlQuery&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.createAllItemsQuery&lt;/span&gt;();&lt;br /&gt;         &lt;br /&gt;            listItems = targetList&lt;span style="color: #cc6633;"&gt;.getItems&lt;/span&gt;(query);&lt;br /&gt;            ctx&lt;span style="color: #cc6633;"&gt;.load&lt;/span&gt;(listItems);&lt;br /&gt;                    &lt;br /&gt;            ctx&lt;span style="color: #cc6633;"&gt;.executeQueryAsync&lt;/span&gt;(onLoadItemsSuccess, onLoadItemsFail);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        function onLoadItemsFail(sender, args) {&lt;br /&gt;            alert('Failed to get lists items. Error:' + args&lt;span style="color: #cc6633;"&gt;.get_message&lt;/span&gt;());&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        function onLoadItemsSuccess(sender, args) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; listEnumerator = listItems&lt;span style="color: #cc6633;"&gt;.getEnumerator&lt;/span&gt;()&lt;span style="color: #006080;"&gt;;&lt;br /&gt;            &lt;br /&gt;            var item, pin, loc;&lt;/span&gt;&lt;br /&gt;            while (listEnumerator&lt;span style="color: #cc6633;"&gt;.moveNext&lt;/span&gt;())  {&lt;br /&gt;                item = listEnumerator&lt;span style="color: #cc6633;"&gt;.get_current&lt;/span&gt;();&lt;br /&gt;                loc = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Location&lt;/span&gt;(item&lt;span style="color: #cc6633;"&gt;.get_item&lt;/span&gt;("Latitude"), item&lt;span style="color: #cc6633;"&gt;.get_item&lt;/span&gt;("Longitude"));&lt;br /&gt;                pin = new Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Pushpin&lt;/span&gt;(loc);&lt;br /&gt;                pin&lt;span style="color: #cc6633;"&gt;.Metadata&lt;/span&gt; = {&lt;br /&gt;                    Title : item&lt;span style="color: #cc6633;"&gt;.get_item&lt;/span&gt;("Title"),&lt;br /&gt;                    Location : item&lt;span style="color: #cc6633;"&gt;.get_item&lt;/span&gt;("Location")&lt;br /&gt;                };&lt;br /&gt;                Microsoft&lt;span style="color: #cc6633;"&gt;.Maps&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Events&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.addHandler&lt;/span&gt;(pin, 'click', displayInfobox);&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;map&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.entities&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.push&lt;/span&gt;(pin);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        function displayInfobox(e) {&lt;br /&gt;            if (e&lt;span style="color: #cc6633;"&gt;.targetType&lt;/span&gt; == 'pushpin') {&lt;br /&gt;                infobox&lt;span style="color: #cc6633;"&gt;.setLocation&lt;/span&gt;(e&lt;span style="color: #cc6633;"&gt;.target&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.getLocation&lt;/span&gt;());&lt;br /&gt;                infobox&lt;span style="color: #cc6633;"&gt;.setOptions&lt;/span&gt;({ &lt;br /&gt;                    visible: true, &lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;title&lt;/span&gt;: e&lt;span style="color: #cc6633;"&gt;.target&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Metadata&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Title&lt;/span&gt;, &lt;br /&gt;                    description: e&lt;span style="color: #cc6633;"&gt;.target&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Metadata&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.Location&lt;/span&gt; &lt;br /&gt;                });&lt;br /&gt;            }&lt;br /&gt;        } &lt;br /&gt;          &lt;br /&gt;        function getQueryStringValue(key) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; queryString = document&lt;span style="color: #cc6633;"&gt;.URL&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.split&lt;/span&gt;("?");&lt;br /&gt;            if(queryString &lt;span style="color: #006080;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;amp;&lt;/span&gt; queryString&lt;span style="color: #cc6633;"&gt;.length&lt;/span&gt; &lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt; 1)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; params = queryString[1]&lt;span style="color: #cc6633;"&gt;.split&lt;/span&gt;("&lt;span style="color: #006080;"&gt;&amp;amp;&lt;/span&gt;");&lt;br /&gt;&lt;br /&gt;                for (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;i&lt;/span&gt; &lt;span style="color: #006080;"&gt;= 0;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;i&lt;/span&gt; &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: #006080;"&gt;params.length;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;i&lt;/span&gt; = &lt;span style="color: #0000ff;"&gt;i&lt;/span&gt; + 1) {&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; value = params[&lt;span style="color: #0000ff;"&gt;i&lt;/span&gt;]&lt;span style="color: #cc6633;"&gt;.split&lt;/span&gt;("=");&lt;br /&gt;                    if (value[0] == key){&lt;br /&gt;                        return value[1];&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            &lt;span style="color: #006080;"&gt;}&lt;br /&gt;            &lt;br /&gt;            return null;&lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        window&lt;span style="color: #cc6633;"&gt;.parent&lt;/span&gt;&lt;span style="color: #cc6633;"&gt;.onload&lt;/span&gt; &lt;span style="color: #006080;"&gt;= getMap;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;script&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;head&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;body&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;div&lt;/span&gt; id='myMap' &lt;span style="color: #0000ff;"&gt;style&lt;/span&gt;="&lt;span style="color: #0000ff;"&gt;position&lt;/span&gt;:&lt;span style="color: #006080;"&gt;relative;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;width&lt;/span&gt;:&lt;span style="color: #006080;"&gt;100%;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;height&lt;/span&gt;:&lt;span style="color: #006080;"&gt;450px;&lt;/span&gt;"&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;div&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;body&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #006080;"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: #0000ff;"&gt;html&lt;/span&gt;&lt;span style="color: #006080;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;What does this code actually do? The &lt;i&gt;getMap&lt;/i&gt; function loads the map and adds two layers to the map; one for the data and the other for the infobox. This is based on a blog post I created on displaying &lt;a href="http://rbrundritt.wordpress.com/2011/10/13/multiple-pushpins-and-infoboxes-in-bing-maps-v7/"&gt;Multiple pushpins and Infoboxes in Bing Maps V7&lt;/a&gt;. It then gets the &lt;i&gt;ListTitle&lt;/i&gt; query string value and then executes the &lt;i&gt;ExecuteOrDelayUntilScriptLoaded&lt;/i&gt; function in the parent page which will execute &lt;i&gt;LoadList&lt;/i&gt; function in our code after the &lt;b&gt;sp.js&lt;/b&gt; file has finished loading in the main page. This ensures that the ECMAScripts we need are loaded. When the &lt;i&gt;LoadList&lt;/i&gt; function is called it takes the &lt;i&gt;ListTitle&lt;/i&gt; query string value and passes it to the &lt;i&gt;getListItems&lt;/i&gt; function. The &lt;i&gt;getListItems&lt;/i&gt; function gets the current client context of the SharePoint site and creates a query to get all items in the list. It then executes the list and if successful calls the &lt;i&gt;onLoadItemsSuccessful&lt;/i&gt; function which loops through the list items and creates pushpins and overlays them on the map. If the query failed to load the list items an alert is displayed to user.&lt;/p&gt;
&lt;p&gt;Now, take the &lt;b&gt;MyLocationListMap.html&lt;/b&gt; file and upload it into your Site Assets folder. Get the URL to the page.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP_5F00_Assets2_5F00_2DA26C99.jpg"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SP_Assets2" border="0" alt="SP_Assets2" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP_5F00_Assets2_5F00_thumb_5F00_414F562D.jpg" width="473" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Navigate back to the &lt;b&gt;MyLocationMap&lt;/b&gt; page in your SharePoint site and open the tool pane to the Page Viewer web part we added earlier. Update the Link property with the URL to the &lt;b&gt;MyLocationListMap.html&lt;/b&gt; file and change the title to &amp;ldquo;My Location Map&amp;rdquo; then save the changes. The page will refresh and look something like this once you click one of the pushpins.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/image_5F00_121D6A96.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/image_5F00_thumb_5F00_03527317.png" width="604" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Tip for SharePoint 2013 Users&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;SharePoint 2013 introduces a new field type named Geolocation that enables you to create SharePoint lists with location information. In Geolocation columns, you can enter location information as a pair of latitude and longitude coordinates in decimal degrees or retrieve the coordinates of the user&amp;rsquo;s current location from the browser if it implements the W3C Geolocation API. In the list, SharePoint 2013 displays the location on Bing Maps. In addition, a new view named Map View displays the list items as pushpins on a Bing Maps. Together, the Geolocation field and the Map View enable you to give a spatial context to any information by integrating data from SharePoint into a mapping experience, and let your users engage in new ways in your web and mobile apps and solutions. Also, its worth mentioning that SharePoint sites are generally internal applications and would require an Enterprise Bing Maps key. Take a look at the &lt;a href="http://msdn.microsoft.com/en-us/library/jj163135.aspx"&gt;Integrating location and map functionality in SharePoint 2013&lt;/a&gt; documentation for more information.&lt;/p&gt;
&lt;p&gt;Here is how the out of the box map looks when you hover over a single list item that has location information.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP2013_5F00_Item_5F00_3451621D.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SP2013_Item" border="0" alt="SP2013_Item" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP2013_5F00_Item_5F00_thumb_5F00_28F82813.png" width="600" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is what the new Map View looks like:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP2013_5F00_listItems_5F00_0BC25A3C.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SP2013_listItems" border="0" alt="SP2013_listItems" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/SP2013_5F00_listItems_5F00_thumb_5F00_41972989.png" width="600" height="320" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a great first step for anyone wanting to add Bing Maps to their SharePoint site. Note: the out of the box functionality is limited to this. If you want to customize the map or add complex shapes (like polygons), you will need to do some additional custom development. The steps outlined earlier in this post can be used to do just that. There are also a lot of really great web parts available on &lt;a href="http://www.codeplex.com/site/search?query=Bing%20Maps%20SharePoint&amp;amp;ac=4"&gt;CodePlex&lt;/a&gt; which you could use as a starting point.&lt;/p&gt;
&lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693333&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="Sharepoint" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Sharepoint/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>New Traffic Manager in AJAX v7</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/18/new-traffic-manager-in-ajax-v7.aspx" /><link rel="enclosure" type="image/jpeg" length="52277" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-33-43/Traffic.JPG" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/18/new-traffic-manager-in-ajax-v7.aspx</id><published>2013-03-18T18:00:00Z</published><updated>2013-03-18T18:00:00Z</updated><content type="html">&lt;p&gt;Bing Maps AJAX v7 control can now show traffic incidents in addition to traffic flow and gives you the control to show or hide both with the new &lt;a href="http://msdn.microsoft.com/en-us/library/jj953497.aspx"&gt;TrafficManager&lt;/a&gt;. Check out the following view of Seattle traffic flow and incidents. Hovering over an incident bring up details including time and duration. You can find the sample that created this view and more details on the TrafficManager page.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image001_5F00_0F87AC63.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image001" border="0" alt="clip_image001" src="http://bingcommunity.search.live.net/blogs/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-54-35-metablogapi/clip_5F00_image001_5F00_thumb_5F00_2DF1ED4C.png" width="454" height="454" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: The TrafficManager class replaces and enhances the functionality provided by the TrafficFlow class which is now deprecated, but will continue to be supported.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693343&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="AJAX v7" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/AJAX+v7/default.aspx" /><category term="Bing Maps (.com)" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+_2800_-com_2900_/default.aspx" /></entry><entry><title>Geocoding a SharePoint List Item</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/07/geocoding-a-sharepoint-list-item.aspx" /><link rel="enclosure" type="image/jpeg" length="16913" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-26-26/Sharepoint.JPG" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/03/07/geocoding-a-sharepoint-list-item.aspx</id><published>2013-03-07T17:49:00Z</published><updated>2013-03-07T17:49:00Z</updated><content type="html">&lt;p&gt;Bing Maps is often integrated into SharePoint sites to display different types of information, from the location of customers to advance business intelligence information. A common task that needs to be carried out at some point is geocoding the location data so it can be displayed on a map. I&amp;rsquo;ve seen many different implementations, some good and others not so much. Whenever possible you should try and geocode the data ahead of time and store the coordinates. This will improve performance and generate a lot less transactions against your Bing Maps account.&lt;/p&gt;
&lt;p&gt;In this blog post we are going to create a SharePoint List and add the functionality to geocode an item&amp;nbsp;while also&amp;nbsp;updating the coordinates when editing. This will allow us to store the coordinate information right in the SharePoint List.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Creating the SharePoint List&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Before we start diving into the geocoding logic we will first need to create a SharePoint List and add a geocoding button to the item form. To do this, follow these steps:&lt;/p&gt;
&lt;p&gt;1) Create a custom list called &lt;b&gt;&lt;i&gt;MyLocations&lt;/i&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8512.image_5F00_1C7190E8.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5488.image_5F00_thumb_5F00_7B7E1E40.png" width="554" height="322" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) Once the new list should appears go to the &amp;ldquo;List Tools&amp;rdquo; tab and select &amp;ldquo;List Settings&amp;rdquo;. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3365.image20_5F00_0EB6ACE2.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8836.image20_5F00_thumb_5F00_593DEABC.png" width="550" height="98" /&gt;&lt;/a&gt; &lt;br /&gt;3) In the settings page go to the Column section and use the &amp;ldquo;Create Column&amp;rdquo; option to create the following columns:&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table border="1" cellspacing="0" cellpadding="0" align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="114"&gt;
&lt;p&gt;&lt;b&gt;Column Name&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="144"&gt;
&lt;p&gt;&lt;b&gt;Column Type&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="114"&gt;
&lt;p&gt;Location&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="144"&gt;
&lt;p&gt;Single line of text&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="114"&gt;
&lt;p&gt;Latitude&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="144"&gt;
&lt;p&gt;Number (1, 1.0, 100)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="114"&gt;
&lt;p&gt;Longitude&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="144"&gt;
&lt;p&gt;Number (1, 1.0, 100)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align="left"&gt;4) When you are done the columns section of the list settings should look like this: &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3326.image_5F00_6B8ED97C.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4885.image_5F00_thumb_5F00_4B0799CA.png" width="570" height="267" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align="left"&gt;5) Now go back to the List and under the &amp;ldquo;List Tools&amp;rdquo; tab select the &amp;ldquo;Customize Form&amp;rdquo; button. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4786.image16_5F00_38B6AB0A.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4863.image16_5F00_thumb_5F00_461CBE10.png" width="550" height="98" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align="left"&gt;&lt;br /&gt;6) This will open up the item input form with Microsoft InfoPath and will look something like this:&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4174.image_5F00_5009D779.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5383.image_5F00_thumb_5F00_648F26F7.png" width="554" height="177" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7) Next, select the area just right of the textbox for the Location field. Expand the controls menu from the tool bar and insert a button. This will insert a button right under the textbox.&lt;/p&gt;
&lt;p&gt;8) Right click the button and go to &amp;ldquo;Button properties&amp;rdquo;. Change the label to &amp;ldquo;Geocode&amp;rdquo;. Under the Advance tab set the ScreenTip property to &amp;ldquo;Geocode&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2766.image_5F00_08484E92.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7215.image_5F00_thumb_5F00_55E47B12.png" width="408" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;9) Edit the properties for the Location, Latitude and Longitude textboxes and under the advance tab give the ScreenTip property the same name as the textbox. Then publish the form. Go back to the list and open the form to add a new item. It will look like the image below. Note that clicking on the geocode button won&amp;rsquo;t do anything right now. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8688.image_5F00_3C7C77D8.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8468.image_5F00_thumb_5F00_3C1044E3.png" width="554" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Adding in the Geocoding functionality&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To make things easy, we are going to handle all the geocoding functionality from JavaScript.&amp;nbsp;To&amp;nbsp;make this reusable, we will create a JavaScript file that we can pull into the item forms for any list that has the required fields.&lt;/p&gt;
&lt;p&gt;1) Open up notepad or the text editor of your choice and copy the following code into it. Be sure to add your Bing Maps key. Save the file as ListGeocoder.js. This code uses the &lt;span style="background-color: #ffffff;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701715.aspx"&gt;Bing Maps REST geocoding service&lt;/a&gt;&lt;/span&gt; to geocode the Location field and populates coordinates of the first result into the latitude and longitude fields of our item.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; GeocodeTools = {&lt;br /&gt;    BingMapsKey : &lt;span style="color: #006080;"&gt;"YOUR_BING_MAPS_KEY"&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;    getField : &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (fieldType,fieldTitle) { &lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; docTags = document.getElementsByTagName(fieldType); &lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i=0; i &amp;lt; docTags.length; i++) { &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (docTags[i].title == fieldTitle) { &lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; docTags[i] &lt;br /&gt;            } &lt;br /&gt;        } &lt;br /&gt;    },&lt;br /&gt;&lt;br /&gt;    GeocodeLocation : &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;() { &lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; locField = GeocodeTools.getField(&lt;span style="color: #006080;"&gt;'input'&lt;/span&gt;,&lt;span style="color: #006080;"&gt;'Location'&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;(locField &amp;amp;&amp;amp; locField.value &amp;amp;&amp;amp; locField.value != &lt;span style="color: #006080;"&gt;''&lt;/span&gt;){&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; geocodeRequest = &lt;span style="color: #006080;"&gt;"http://dev.virtualearth.net/REST/v1/Locations?query="&lt;/span&gt; + encodeURI(locField.value) + &lt;span style="color: #006080;"&gt;"&amp;amp;output=json&amp;amp;jsonp=GeocodeTools.UpdateFields&amp;amp;key="&lt;/span&gt; + GeocodeTools.BingMapsKey;&lt;br /&gt;            GeocodeTools.CallRestService(geocodeRequest);&lt;br /&gt;        }&lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;{&lt;br /&gt;            alert(&lt;span style="color: #006080;"&gt;'Invalid \'Location\' value.'&lt;/span&gt;);&lt;br /&gt;        }        &lt;br /&gt;    },&lt;br /&gt;    UpdateFields : &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;(result){&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (result &amp;amp;&amp;amp;&lt;br /&gt;           result.resourceSets &amp;amp;&amp;amp;&lt;br /&gt;           result.resourceSets.length &amp;gt; 0 &amp;amp;&amp;amp;&lt;br /&gt;           result.resourceSets[0].resources &amp;amp;&amp;amp;&lt;br /&gt;           result.resourceSets[0].resources.length &amp;gt; 0) &lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; latField = GeocodeTools.getField(&lt;span style="color: #006080;"&gt;'input'&lt;/span&gt;,&lt;span style="color: #006080;"&gt;'Latitude'&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; lonField = GeocodeTools.getField(&lt;span style="color: #006080;"&gt;'input'&lt;/span&gt;,&lt;span style="color: #006080;"&gt;'Longitude'&lt;/span&gt;);&lt;br /&gt;            &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;(latField &amp;amp;&amp;amp; lonField){&lt;br /&gt;                latField.value = result.resourceSets[0].resources[0].point.coordinates[0] + &lt;span style="color: #006080;"&gt;''&lt;/span&gt;;&lt;br /&gt;                lonField.value = result.resourceSets[0].resources[0].point.coordinates[1] + &lt;span style="color: #006080;"&gt;''&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    },&lt;br /&gt;    &lt;br /&gt;    CallRestService : &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (request) &lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; script = document.createElement(&lt;span style="color: #006080;"&gt;"script"&lt;/span&gt;);&lt;br /&gt;        script.setAttribute(&lt;span style="color: #006080;"&gt;"type"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;);&lt;br /&gt;        script.setAttribute(&lt;span style="color: #006080;"&gt;"src"&lt;/span&gt;, request);&lt;br /&gt;        document.body.appendChild(script);&lt;br /&gt;    }&lt;br /&gt; };&lt;br /&gt;&lt;br /&gt;window.onload = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;(){&lt;br /&gt;    setTimeout(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;(){&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; geocodeBtn = GeocodeTools.getField(&lt;span style="color: #006080;"&gt;'input'&lt;/span&gt;,&lt;span style="color: #006080;"&gt;'Geocode'&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;(geocodeBtn != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;){&lt;br /&gt;            geocodeBtn.onclick = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;(){ GeocodeTools.GeocodeLocation(); };&lt;br /&gt;        }&lt;br /&gt;    },500);&lt;br /&gt;};&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;2) Upload this to your SharePoint site by going to Site Actions -&amp;gt; View All Site Content. Under the Document Libraries section choose &amp;ldquo;Site Assets&amp;rdquo; and add the ListGeocoder.js file there.&lt;/p&gt;
&lt;p&gt;3) Once the file is uploaded, right click on it and select &amp;ldquo;Copy Shortcut&amp;rdquo;. This will get the URL to the file which you will need later.&lt;/p&gt;
&lt;p&gt;4) Go back to your SharePoint list and under the List Tools click on the &amp;ldquo;Form Web Parts&amp;rdquo; dropdown and select &amp;ldquo;(Item) New Form&amp;rdquo;. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4213.image_5F00_0B99C06D.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3240.image_5F00_thumb_5F00_5F7CC37B.png" width="550" height="192" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5) This will open up a page where we can further edit the form. Under the Page tools tab choose the option to insert a Web Part. From the panel that appears select the &amp;ldquo;Forms&amp;rdquo; category and the &amp;ldquo;HTML Form Web Part&amp;rdquo;&amp;nbsp; &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7888.image_5F00_30B70AD9.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6076.image_5F00_thumb_5F00_44D02762.png" width="501" height="384" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6) The new web part will appear above the item form and consist of a textbox and a button. Drag this web part so that it is below the input form. Then choose the option to edit this web part.&amp;nbsp; &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1586.image_5F00_43F7C178.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4745.image_5F00_thumb_5F00_0E7EFF53.png" width="232" height="247" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7) Press the Source Editor button. This will open up a panel that has some HTML markup. Remove all the HTML and add the following script tag information, be sure to insert the proper URL to the ListGeocoder.js file you uploaded earlier.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0407.image_5F00_1BE51259.png"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3264.image_5F00_thumb_5F00_666C5033.png" width="554" height="211" /&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;8) Go back to the SharePoint List and repeat steps 4 to 7 for the &amp;ldquo;(Item) Edit Form&amp;rdquo; web part.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Try it out&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;At this point we have all the functionality we need to geocode a list item when adding or editing and item. To test it out go to the SharePoint list and select &amp;ldquo;Add new item&amp;rdquo;. In the form that opens give the item a title and set the Location property to &amp;ldquo;New York&amp;rdquo; and press the geocode button. The Latitude and Longitude values will become filled with numbers and look something like this: &lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8561.image_5F00_21BFB5F2.png"&gt;&lt;img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="image" border="0" alt="image" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5415.image_5F00_thumb_5F00_3A4F5342.png" width="554" height="376" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now save the item and choose the item you just created from the list and edit it. Change the location to &amp;ldquo;London&amp;rdquo; and press the geocode button. The latitude and longitude fields will update with new coordinates. If they don&amp;rsquo;t, ensure you added the HTML form web part to the Edit form.&lt;/p&gt;
&lt;p&gt;This method of geocoding data in SharePoint is useful for scenarios where your users are manually entering data through the SharePoint portal. There may be situations where you want to geocode a large quantity of locations at once, perhaps a database of locations. In this case you will want to use the batch geocoding functionality in the &lt;span style="background-color: #ffffff;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701733.aspx"&gt;Bing Spatial Data Services&lt;/a&gt;&lt;/span&gt;. This allows you to geocode up to 200,000 addresses in a single request and will take a fraction of the time it would take if you made multiple requests to the standard REST geocoding service. As an additional bonus, the batch geocoding service is a free service to all Bing Maps Enterprise customers. If you have a large number of entries being added to a list, you can leverage&amp;nbsp;another approach to geocode the list by creating a workflow that runs after the list has been fully updated and batch geocodes all the ungeocoded locations in the list.&lt;/p&gt;
&lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692626&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="REST" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/REST/default.aspx" /><category term="Sharepoint" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Sharepoint/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>New Top of the World and High Resolution Satellite Imagery</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/28/new-top-of-the-world-imagery.aspx" /><link rel="enclosure" type="image/png" length="140422" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-32-70/Top-of-World.png" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/28/new-top-of-the-world-imagery.aspx</id><published>2013-02-28T17:19:00Z</published><updated>2013-02-28T17:19:00Z</updated><content type="html">&lt;p&gt;We are excited to introduce our new top of the world imagery - which includes &lt;a href="http://en.wikipedia.org/wiki/Bathymetry"&gt;bathymetry&lt;/a&gt; data from Scripps Institution of Oceanography. We are also releasing over 13 million sq km of updated satellite imagery!&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6747.satellitetopicon_5F00_2EF35CBE.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="satellitetopicon" border="0" alt="satellitetopicon" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5265.satellitetopicon_5F00_thumb_5F00_235D9F7F.jpg" width="141" height="244" /&gt;&lt;/a&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0207.globalorthotopicon_5F00_63278604.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="globalorthotopicon" border="0" alt="globalorthotopicon" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5165.globalorthotopicon_5F00_thumb_5F00_34CE0057.jpg" width="141" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="637"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="64"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6237.satellite_5F00_2CD65DF5.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="satellite" border="0" alt="satellite" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2364.satellite_5F00_thumb_5F00_0191C6EE.jpg" width="70" height="56" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="571"&gt;&lt;strong&gt;Satellite &lt;/strong&gt;          &lt;br /&gt;High-Resolution Nadir or “Straight Down” &lt;a href="http://en.wikipedia.org/wiki/Orthophoto" target="_blank"&gt;orthophotos&lt;/a&gt; taken by aircraft or satellite           &lt;br /&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2502.satellite_5F00_divider_5F00_550x3_5F00_144A1B3D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="satellite_divider_550x3" border="0" alt="satellite_divider_550x3" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5086.satellite_5F00_divider_5F00_550x3_5F00_thumb_5F00_2C6D8598.jpg" width="551" height="6" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8231.TOW_5F00_Full_5F00_550x314_5F00_44FD22E8.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="TOW_Full_550x314" border="0" alt="TOW_Full_550x314" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3782.TOW_5F00_Full_5F00_550x314_5F00_thumb_5F00_30975D5D.jpg" width="554" height="318" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We are pleased to present our new seamless base satellite imagery provided by &lt;a href="http://terracolor.net/"&gt;TerraColor&lt;/a&gt;. This imagery has a resolution of 15 meters per pixel, providing coverage of the entire world!&lt;/p&gt;  &lt;p&gt;This new imagery will enhance overall viewer experience with Bing Maps and the Windows 8 Maps App. Experience it yourself by visiting the &lt;a href="bingmaps://?cp=23.11553~9.91657&amp;amp;lvl=3&amp;amp;sty=a&amp;amp;trfc=0"&gt;Windows 8 Maps App&lt;/a&gt; or &lt;a href="http://binged.it/129iGkL"&gt;Bing Maps&lt;/a&gt;. The new Top of the World imagery (pictured above) is visible from zoom levels 1-13. Zooming in deeper will reveal our high resolution satellite imagery.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Cloud Coverage&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Our new base satellite layer is analyzed and processed to provide views with reduced cloud cover in areas notorious for persistent cloud cover such as high latitude and equatorial regions. More detail is now visible in these once problematic areas, as seen in this island example!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div align="center"&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="500" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;&amp;#160;&amp;#160;&amp;#160; Oahu, Hawaii Before&lt;/font&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Oahu, Hawaii After&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="bingmaps://?cp=21.46908~-157.95149&amp;amp;lvl=11&amp;amp;sty=a&amp;amp;trfc=0"&gt;W8 Map App &lt;/a&gt;| &lt;a href="http://binged.it/YpDITQ"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="250"&gt;           &lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7585.Standard_2D00_HI_5F00_74B9AEB6.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Standard-HI" border="0" alt="Standard-HI" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1586.Standard_2D00_HI_5F00_thumb_5F00_7A281F5A.jpg" width="279" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td valign="top" width="250"&gt;           &lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7762.HInewTOW_5F00_124B89B6.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="HInewTOW" border="0" alt="HInewTOW" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5481.HInewTOW_5F00_thumb_5F00_57F013D4.jpg" width="279" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Bathymetric Shading&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In addition to reduced cloud coverage, we now have &lt;a href="http://en.wikipedia.org/wiki/Bathymetry"&gt;bathymetric&lt;/a&gt; imagery! The topography of the ocean floor is represented by color shading (dark blues to light blues) indicating changes in ocean depth. An ocean mask minimizes areas typically obscured by ice and clouds. The combination of the ocean mask and bathymetric imagery provides a more meaningful view of the world oceans. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div align="center"&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="538" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&amp;#160; &lt;font color="#333333"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Fiji Before&lt;/font&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="286"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Fiji After&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="bingmaps://?cp=-17.69634~179.79585&amp;amp;lvl=7&amp;amp;sty=a&amp;amp;trfc=0"&gt;W8 Map App &lt;/a&gt;| &lt;a href="http://binged.it/WZJDSd"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="250"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7776.beforewestfiji275x250_5F00_6163C8D8.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="beforewestfiji275x250" border="0" alt="beforewestfiji275x250" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6403.beforewestfiji275x250_5F00_thumb_5F00_5FB2FD04.jpg" width="279" height="254" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="286"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1321.afterwestfiji275x250_5F00_2A224B0F.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="afterwestfiji275x250" border="0" alt="afterwestfiji275x250" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0753.afterwestfiji275x250_5F00_thumb_5F00_6FC6D52D.jpg" width="279" height="254" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;High Resolution Satellite Imagery&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;This month we are adding new High Resolution Satellite imagery with a total coverage of 13,799,276 sq km! &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8030.SatCoverageEd9_5F00_550x229_5F00_2F1D05BB.jpg"&gt;&lt;em&gt;&lt;/em&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3835.SatCoverageEd9_5F00_550x229_5F00_3C8318C1.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="SatCoverageEd9_550x229" border="0" alt="SatCoverageEd9_550x229" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6064.SatCoverageEd9_5F00_550x229_5F00_thumb_5F00_112506CA.jpg" width="554" height="233" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;&lt;em&gt;Visit &lt;/em&gt;&lt;/font&gt;&lt;a href="http://www.bing.com/maps/?v=2&amp;amp;cp=0.000000~0.000000&amp;amp;lvl=2&amp;amp;dir=0&amp;amp;sty=h&amp;amp;app=50493~myappname~worldtour~p_rid~1cb5822a-7af4-4a47-9d70-0fc579b82ebb&amp;amp;FORM=LMLTCC"&gt;Bing Maps World Tour App&lt;/a&gt;&lt;em&gt;&lt;/em&gt;&lt;em&gt; &lt;/em&gt;&lt;font color="#333333"&gt;&lt;em&gt;to view&lt;/em&gt; &lt;em&gt;full coverage&lt;/em&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;The images below include: a meandering river running through the Brazilian Highlands, a metropolitan area, dunes, and an active stratovolcano on the Pacific Ring of Fire.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div align="center"&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="569" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="283"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Southwest of Jacobina do Piauí, Brazil&lt;/font&gt;&lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/WmKU9l"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="284"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Cheboksary, Russia&lt;/font&gt;&lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/XD124x"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="283"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3276.brazilian_5F00_highlands225x200_5F00_44528E66.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="brazilian_highlands225x200" border="0" alt="brazilian_highlands225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7411.brazilian_5F00_highlands225x200_5F00_thumb_5F00_2DB0401F.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="284"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0574.cheboksary225x200_5F00_6CA1C0BA.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="cheboksary225x200" border="0" alt="cheboksary225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3884.cheboksary225x200_5F00_thumb_5F00_31DA17E4.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="283"&gt;           &lt;h1&gt;&lt;font color="#333333"&gt;Murzuq Desert, Southwestern Libya&lt;/font&gt;&lt;/h1&gt;            &lt;h1&gt;&lt;a href="http://binged.it/Y2egnm"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="284"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Kamchatka Peninsula, Russia&lt;/font&gt;&lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/WmL8NC"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="283"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6646.libya225x200_5F00_3571041C.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="libya225x200" border="0" alt="libya225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4263.libya225x200_5F00_thumb_5F00_1C0900E2.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="284"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2318.SAT_5F00_Image_5F00_Russia_5F00_22769008.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAT_Image_Russia" border="0" alt="SAT_Image_Russia" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6761.SAT_5F00_Image_5F00_Russia_5F00_thumb_5F00_2BEF4E7E.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p align="left"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Additional Satellite Highlights:&lt;/strong&gt; &lt;/p&gt;  &lt;p align="center"&gt;Sardarshahar, India   &lt;br /&gt;&lt;a href="http://binged.it/Ypewg2"&gt;Bing Maps&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;   &lt;br /&gt;South Georgia and South Sandwich Islands,     &lt;br /&gt;United Kingdom overseas territory    &lt;br /&gt;&amp;#160;&lt;a href="http://binged.it/Y2dve3"&gt;Bing Maps&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;   &lt;br /&gt;Pitesti, Romania    &lt;br /&gt;&amp;#160;&lt;a href="http://binged.it/Yph6mj"&gt;Bing Maps&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;   &lt;br /&gt;Arbil, Iraq    &lt;br /&gt;&lt;a href="http://binged.it/Y0WWzb"&gt;Bing Maps&lt;/a&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="641"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="69"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7827.globalortho_5F00_7FD2518C.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="globalortho" border="0" alt="globalortho" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1157.globalortho_5F00_thumb_5F00_1861EEDD.jpg" width="70" height="57" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="570"&gt;         &lt;p&gt;&lt;strong&gt;Global Ortho&lt;/strong&gt;             &lt;br /&gt;High-Resolution nadir or “straight down” &lt;a href="http://en.wikipedia.org/wiki/Orthophoto"&gt;orthophotos&lt;/a&gt; taken by aircraft&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5305.globalortho_5F00_divider_5F00_550x3_5F00_5D7C9A6B.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="globalortho_divider_550x3" border="0" alt="globalortho_divider_550x3" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7077.globalortho_5F00_divider_5F00_550x3_5F00_thumb_5F00_5CA43481.jpg" width="552" height="6" /&gt;&lt;/a&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h1&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5822.GOCoverageEd9_5F00_550x236_5F00_Blog_5F00_7533D1D1.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="GOCoverageEd9_550x236_Blog" border="0" alt="GOCoverageEd9_550x236_Blog" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0640.GOCoverageEd9_5F00_550x236_5F00_Blog_5F00_thumb_5F00_01554BF9.jpg" width="554" height="240" /&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;&lt;em&gt;Visit &lt;/em&gt;&lt;/font&gt;&lt;a href="http://www.bing.com/maps/?v=2&amp;amp;cp=0.000000~0.000000&amp;amp;lvl=2&amp;amp;dir=0&amp;amp;sty=h&amp;amp;app=50493~myappname~worldtour~p_rid~1661dcc0-0989-476b-a9bd-a2efc04d1167&amp;amp;FORM=LMLTCC"&gt;&lt;em&gt;Bing Maps World Tour App&lt;/em&gt;&lt;/a&gt;&lt;em&gt; &lt;font color="#333333"&gt;to view full coverage&lt;/font&gt;&lt;/em&gt;&lt;/h1&gt;  &lt;p align="center"&gt;&amp;#160;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="605"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7827.Color_2D00_1_5F00_0C9C81DE.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Color 1" border="0" alt="Color 1" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0574.Color_2D00_1_5F00_thumb_5F00_4BFA356E.jpg" width="42" height="21" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="559"&gt;Newly Published Global Ortho Imagery &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="44"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1033.Color_2D00_2_5F00_2453B944.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Color 2" border="0" alt="Color 2" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3771.Color_2D00_2_5F00_thumb_5F00_63B16CD4.jpg" width="42" height="18" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="559"&gt;Published Global Ortho Imagery, United States 100% Complete, Western Europe 90% Complete&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;strong&gt;Global Ortho Imagery&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Our latest release of Global Ortho imagery includes 203,271 sq km of new data! In total we have published 11,001,500 sq km covering 100% of the United States and 90% of Western Europe!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="500" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Subdivisions, Åhrus, Denmark&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/XsQuU0"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Port de Monaco, Monaco, France&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/WmLfJ2"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="250"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1638.ArthusDenmark_5F00_225x200_5F00_3C0AF0AA.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ArthusDenmark_225x200" border="0" alt="ArthusDenmark_225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4452.ArthusDenmark_5F00_225x200_5F00_thumb_5F00_7619BD89.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="250"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1106.FR_5F00_Nice225x200_5F00_78DF727C.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="FR_Nice225x200" border="0" alt="FR_Nice225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7450.FR_5F00_Nice225x200_5F00_thumb_5F00_24AFC66C.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Beach near Laredo, Cantabria, Spain&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/WNfEwL"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;          &lt;td valign="top" width="250"&gt;           &lt;h1 align="center"&gt;&lt;font color="#333333"&gt;Wollaton Park, Nottingham, England&lt;/font&gt; &lt;/h1&gt;            &lt;h1 align="center"&gt;&lt;a href="http://binged.it/ZrEDdg"&gt;Bing Maps&lt;/a&gt;&lt;/h1&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="250"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7534.N43W00Spain4225x200_5F00_71738D02.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="N43W00Spain4225x200" border="0" alt="N43W00Spain4225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3326.N43W00Spain4225x200_5F00_thumb_5F00_3403287B.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="250"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0143.BirminghamEngland_5F00_225x200_5F00_4ECF4E87.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="BirminghamEngland_225x200" border="0" alt="BirminghamEngland_225x200" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2604.BirminghamEngland_5F00_225x200_5F00_thumb_5F00_26506C73.jpg" width="279" height="248" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div align="center"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div align="center"&gt;&lt;strong&gt;Additional Highlights:&lt;/strong&gt;&lt;/div&gt; &lt;strong&gt;&lt;/strong&gt;  &lt;div align="center"&gt;   &lt;br /&gt;Gran Zebrù Mountain, East of Bormio, Italy&amp;#160; &lt;br /&gt; &lt;a href="http://binged.it/XsUKmu"&gt;Bing Maps&lt;/a&gt; &lt;/div&gt;  &lt;div align="center"&gt;   &lt;br /&gt;Magdalena Peninsula, Santander, Spain     &lt;br /&gt;&lt;a href="http://binged.it/WQlcqd"&gt;Bing Maps&lt;/a&gt; &lt;/div&gt;  &lt;div align="center"&gt;   &lt;br /&gt;Turning Torso Skyscraper, Malmö, Sweden&amp;#160; &lt;br /&gt; &lt;a href="http://binged.it/YZQxWW"&gt;Bing Maps&lt;/a&gt; &lt;/div&gt;  &lt;div align="center"&gt;   &lt;br /&gt;Svendborgsund Bridge, Svendborg, Denmark     &lt;br /&gt;&lt;a href="http://binged.it/ZrV9K9"&gt;Bing Maps&lt;/a&gt; &lt;/div&gt;  &lt;div align="center"&gt;   &lt;br /&gt;Innenstadt, Lübeck, Germany     &lt;br /&gt;&lt;a href="http://binged.it/XCZ9of"&gt;Bing Maps&lt;/a&gt;&lt;/div&gt;  &lt;div align="left"&gt;&amp;#160;&lt;/div&gt;  &lt;div align="left"&gt;-The Bing Maps Team &lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693270&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="Windows 8" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Windows+8/default.aspx" /><category term="Global Ortho" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Global+Ortho/default.aspx" /><category term="Bing Maps App" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+App/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /><category term="Bathymetry" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bathymetry/default.aspx" /></entry><entry><title>3D Elevation Models using HTML5 and Bing Maps</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/26/3d-elevation-models-using-html5-and-bing-maps.aspx" /><link rel="enclosure" type="image/png" length="83687" href="http://www.bing.com/blogs/cfs-file.ashx/__key/telligent-evolution-components-attachments/01-5435-00-00-09-69-29-54/Elevation-models-2.png" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/26/3d-elevation-models-using-html5-and-bing-maps.aspx</id><published>2013-02-26T17:15:00Z</published><updated>2013-02-26T17:15:00Z</updated><content type="html">&lt;p&gt;Recently we published a blog post on &lt;a href="http://www.bing.com/community/Site_Blogs/b/maps/archive/2013/02/12/3d-elevation-models-with-bing-maps-wpf.aspx"&gt;3D Elevation Models with Bing Maps WPF&lt;/a&gt;. In this blog post we will show you how to create a tool for generating a 3D model of elevation data from the &lt;a href="http://msdn.microsoft.com/en-us/library/jj158959.aspx"&gt;Bing Maps REST Elevation Service&lt;/a&gt; using HTML5 and Bing Maps.&lt;/p&gt;
&lt;p&gt;There are a couple of different ways to create 3D models in HTML5. The method we are going to use to is to project 3D data onto a 2D canvas. There are several JavaScript libraries available online that can do this. You can also find an in-depth article on how to do the math required for this projection &lt;a href="http://msdn.microsoft.com/en-us/library/hh535759(VS.85).aspx"&gt;here&lt;/a&gt; if you want to write your own library. For this blog post we will use the second method and make use of a JavaScript library called &lt;a href="https://launchpad.net/canvask3d"&gt;K3D&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this blog post we will create a web page that uses Bing Maps to select an area on the map. We will then use the elevation service to get the elevation data for the selected area on the map. We will then generate a 3D model using the HTML5 canvas and the K3D library. We will also make use of sliders from the &lt;a href="http://jqueryui.com/"&gt;jQuery UI&lt;/a&gt; library and add functionality for rotating and translating the model.&lt;/p&gt;
&lt;p&gt;Note that by using a helper library called &lt;a href="http://excanvas.sourceforge.net/"&gt;ExplorerCanvas&lt;/a&gt; you can add HTML5 canvas support to Internet Explorer 7 and 8 which represent 13.8% of the current web browser market share.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Setting up the project&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To help make things clean we will put all of our JavaScript into a file called &lt;i&gt;3DElevationModel.js &lt;/i&gt;and put all JavaScript files into a folder called &lt;i&gt;scripts&lt;/i&gt;. We will also need to include JavaScript libraries for &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, &lt;a href="http://jqueryui.com/"&gt;jQuery UI&lt;/a&gt;, &lt;a href="https://launchpad.net/canvask3d"&gt;K3D&lt;/a&gt;, and &lt;a href="http://excanvas.sourceforge.net/"&gt;ExplorerCanvas&lt;/a&gt;. We will also put all our HTML into a file called index.html. Your project structure should look like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2061.clip_5F00_image001_5F00_0AEB3F80.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="clip_image001" border="0" alt="clip_image001" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6428.clip_5F00_image001_5F00_thumb_5F00_69F7CCD8.png" width="242" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The HTML Layout&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;For this application we will want to have a map that the user will be able to use to select what area the 3D model should be created for. Once the user has selected the area they are interested in they will be able to press a button to generate the 3D model. Once the model is created the user will be able to view and interact with the 3D model.&lt;/p&gt;
&lt;p&gt;We will need to ad references to 7 JavaScript files. The first reference will be to the Bing Maps V7 AJAX control. We will need references to the jQuery and jQuery UI controls to create the sliders for manipulating the 3D model. A reference to the CSS stylesheet for the jQuery UI library will also be needed. The K3D and its associated MathLib JavaScript libraries will need to be referenced to help generate the 3D model. We will also load in the Explorer Canvas JavaScript library if the browser is Internet Explorer with a version less than 9. Finally, we will need a reference to the JavaScript file where we will be putting all our code: &lt;i&gt;3DElevationModel.js&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;For the body of the HTML document, we will need a div to host the map control, a button to generate the 3D model, a canvas element for rendering the model and 6 div&amp;rsquo;s for generating sliders. With this, we can create the markup for the &lt;i&gt;index.html&lt;/i&gt; file. The HTML should look like this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;http-equiv&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='Content-Type'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;content&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='text/html; charset=utf-8'&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='text/javascript'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: #f4f4f4; margin: 0px;"&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!-- jQuery UI libraries for creating Slider controls --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;link&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/css"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;href&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="styles/ui-lightness/jquery-ui-1.8.21.custom.css"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;rel&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="stylesheet"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/jquery-1.7.2.min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/jquery-ui-1.8.21.custom.min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;script type="text/javascript" src="scripts/excanvas.min.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/mathlib-min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/k3d-min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!-- Main JavaScript file where we put all our logic for this application --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/3DElevationModel.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;style&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="text/css"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        .slider&lt;br /&gt;        {&lt;br /&gt;            float:left;&lt;br /&gt;            width:30px;&lt;br /&gt;        }&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onload&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='GetMap();'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='float:left;width:600px'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='myMap'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='position:relative;width:600px;height:400px;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;input&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='button'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='GenerateModel();'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='Generate Model'&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='float:left;width:600px;margin-left:10px;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;canvas&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="canvas"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;width&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="600"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;height&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="400"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="background-color:#fff;"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;canvas&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='width:90px;float:left;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Rotation&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    X&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderX"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Y&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderY"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Z&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderZ"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='width:90px;float:left;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Translate&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    X&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateX"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Y&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateY"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Z&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateZ"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Generating the 3D Elevation Model&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;All the JavaScript for this project will be added to a JavaScript file called &lt;i&gt;3DElevationModel.js&lt;/i&gt;. At the top of this file we will have a number of global variables which we will use throughout the application. Here are the global variables we will have at the top of the file:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; map,            &lt;span style="color: #008000;"&gt;//Reference to Map control&lt;/span&gt;&lt;br /&gt;    canvas,         &lt;span style="color: #008000;"&gt;//Reference to the HTML5 canvas used to render the model&lt;/span&gt;&lt;br /&gt;    sessionKey,     &lt;span style="color: #008000;"&gt;//Bing Maps session key used with REST services&lt;/span&gt;&lt;br /&gt;    mapBounds,      &lt;span style="color: #008000;"&gt;//Area of where elevation data was requested&lt;/span&gt;&lt;br /&gt;    zoom,           &lt;span style="color: #008000;"&gt;//Zoom level used to request elevation data&lt;/span&gt;&lt;br /&gt;    model,          &lt;span style="color: #008000;"&gt;//Reference to the generate model&lt;/span&gt;&lt;br /&gt;    k3d,            &lt;span style="color: #008000;"&gt;//Reference to K3D control&lt;/span&gt;&lt;br /&gt;    numRows = 30,   &lt;span style="color: #008000;"&gt;//Number of rows to use for the elevation samples&lt;/span&gt;&lt;br /&gt;    numCols = 30,   &lt;span style="color: #008000;"&gt;//Number of columns to use for the elevation samples&lt;/span&gt;&lt;br /&gt;    textureColor = [0, 255, 0]; //Color to render the model in&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;When the application starts, lets load the map. Since we will be using the REST elevation service, we will also generate a session key from the map which we can use with the REST services to make those transactions non-billable. And while we are at it, we will also store a reference to the canvas and put all this logic into the GetMap function (which is called when the page is loaded). Also, don&amp;rsquo;t forget to add in your Bing Maps key into this code.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; GetMap() {&lt;br /&gt;    &lt;span style="color: #008000;"&gt;// Initialize the map&lt;/span&gt;&lt;br /&gt;    map = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Map(document.getElementById(&lt;span style="color: #006080;"&gt;'myMap'&lt;/span&gt;),&lt;br /&gt;    {&lt;br /&gt;        credentials: &lt;span style="color: #006080;"&gt;'YOUR_BING_MAPS_KEY'&lt;/span&gt;,&lt;br /&gt;        center: &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(43.08, -79.075),&lt;br /&gt;        zoom: 16,&lt;br /&gt;        mapTypeId: Microsoft.Maps.MapTypeId.aerial&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Generate a Bing Maps Session key to make our call to the REST service non-billable.&lt;/span&gt;&lt;br /&gt;    map.getCredentials(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (sKey) {&lt;br /&gt;        sessionKey = sKey;&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Store a reference to the canvas&lt;/span&gt;&lt;br /&gt;    canvas = document.getElementById(&lt;span style="color: #006080;"&gt;'canvas'&lt;/span&gt;);&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Now we can start adding the logic for requesting the elevation data. When the &amp;ldquo;Generate Model&amp;rdquo; button is pressed the GenerateModel function will be fired. In this method, we will want to clear the canvas of any previous model, store a reference of the current zoom level and map bounds, and create the request to the Bing Maps Elevation service. To make things a bit cleaner, we will round off the coordinates to six decimal places as additional decimal places make no difference. This function will look like this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; GenerateModel() {&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Clear the Canvas&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; context = canvas.getContext(&lt;span style="color: #006080;"&gt;"2d"&lt;/span&gt;);&lt;br /&gt;    context.clearRect(0, 0, canvas.width, canvas.height);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Get the current zoom level and store it&lt;/span&gt;&lt;br /&gt;    zoom = map.getZoom();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Only generates models when the user is zoomed in at a decent zoom level, otherwise the model will just be a flat sheet.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (zoom &amp;lt; 8) {&lt;br /&gt;        alert(&lt;span style="color: #006080;"&gt;"This zoom level is not supported. Please zoom in closer (&amp;gt;8)."&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    mapBounds = map.getBounds();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Get the elevation data for a bounding box area&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; elevationURL = &lt;span style="color: #006080;"&gt;"http://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds="&lt;/span&gt; +&lt;br /&gt;SigDigit(mapBounds.getSouth(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getWest(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getNorth(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getEast(), 6) + &lt;span style="color: #006080;"&gt;"&amp;amp;rows="&lt;/span&gt; + numRows + &lt;span style="color: #006080;"&gt;"&amp;amp;cols="&lt;/span&gt; + numCols + &lt;span style="color: #006080;"&gt;"&amp;amp;key="&lt;/span&gt; + sessionKey;&lt;br /&gt;&lt;br /&gt;    CallRestService(elevationURL + &lt;span style="color: #006080;"&gt;"&amp;amp;jsonp=Render3DModel"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; CallRestService(request) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; script = document.createElement(&lt;span style="color: #006080;"&gt;"script"&lt;/span&gt;);&lt;br /&gt;    script.setAttribute(&lt;span style="color: #006080;"&gt;"type"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;);&lt;br /&gt;    script.setAttribute(&lt;span style="color: #006080;"&gt;"src"&lt;/span&gt;, request);&lt;br /&gt;    document.body.appendChild(script);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Simple method that rounds numbers to a certain number of significant digits&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; SigDigit(number, digits) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; delta = Math.pow(10, digits);&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; Math.round(number * delta) / delta;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;When the elevation service responds to our request, it will fire our callback function called &lt;i&gt;Render3DModel&lt;/i&gt;. This function will need all the logic to generate the 3D model and render it on the canvas. To create the 3D model, we will need to do the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(1) Loop through all the elevation data, calculate the relative coordinate, and then convert this coordinate to a pixel coordinate. We will also need to convert the elevation into a pixel length.&lt;/p&gt;
&lt;p&gt;(2) Next, we can create a 3D mesh out of the data. To do this, we will need to specify all the data points as 3 dimensional coordinates, and then specify the texture coordinate vertices used to render the mesh. We will also need to specify the point indices used to create the triangles needed for the mesh.&lt;/p&gt;
&lt;p&gt;(3) Finally, we can pass all this data to the K3D library to generate the 3D model.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The code for this function looks like this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; Render3DModel(result) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (result != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets.length &amp;gt; 0 &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0] != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0].resources != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0].resources.length &amp;gt; 0) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; elevations = result.resourceSets[0].resources[0].elevations;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Get bounding coordinates of map&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; tlLatitude = mapBounds.getNorth();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; brLatitude = mapBounds.getSouth();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; brLongitude = mapBounds.getEast();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; tlLongitude = mapBounds.getWest();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Calculate the degree spacing between elevation samples&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dLat = Math.abs(tlLatitude - brLatitude) / numRows;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dLon = Math.abs(tlLongitude - brLongitude) / numCols;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; x, y, z, p, m2p, idx, idx2, idx3, idx4;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; meshPoints = [], edgeData = [], vertices = [];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; r = 0; r &amp;lt; numRows; r++) {&lt;br /&gt;            y = tlLatitude - (dLat * r);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//Calculate meters per pixel for given latitude so we can scale the elevation to pixels&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//This is based on: http://msdn.microsoft.com/en-us/library/aa940990.aspx&lt;/span&gt;&lt;br /&gt;            m2p = 156543.04 * Math.cos(y * Math.PI / 180) / Math.pow(2, zoom);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; c = 0; c &amp;lt; numCols; c++) {&lt;br /&gt;                idx = r * numCols + c;&lt;br /&gt;&lt;br /&gt;                x = tlLongitude + (dLon * c);&lt;br /&gt;&lt;br /&gt;                z = -elevations[idx] / m2p;&lt;br /&gt;                p = map.tryLocationToPixel(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(y, x));&lt;br /&gt;&lt;br /&gt;                meshPoints.push({ x: p.x, y: p.y, z: z });&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #008000;"&gt;//Create triangles for vreating the mesh model&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (r &amp;lt; numRows - 1 &amp;amp;&amp;amp; c &amp;lt; numCols - 1) {&lt;br /&gt;                    idx2 = idx + 1;&lt;br /&gt;                    idx3 = idx + numCols;&lt;br /&gt;                    idx4 = idx3 + 1;&lt;br /&gt;&lt;br /&gt;                    edgeData.push({ a: idx, b: idx2 });&lt;br /&gt;                    edgeData.push({ a: idx2, b: idx3 });&lt;br /&gt;                    edgeData.push({ a: idx3, b: idx });&lt;br /&gt;                    vertices.push({ vertices: [idx, idx3, idx2], color: textureColor });&lt;br /&gt;&lt;br /&gt;                    edgeData.push({ a: idx2, b: idx4 });&lt;br /&gt;                    edgeData.push({ a: idx4, b: idx3 });&lt;br /&gt;                    edgeData.push({ a: idx3, b: idx2 });&lt;br /&gt;                    vertices.push({ vertices: [idx2, idx3, idx4], color: textureColor });&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Bind a K3D Controller object to the canvas&lt;/span&gt;&lt;br /&gt;        k3d = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; K3D.Controller(canvas, &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;// create a K3D object for rendering&lt;/span&gt;&lt;br /&gt;        model = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; K3D.K3DObject();&lt;br /&gt;        with (model) {&lt;br /&gt;            drawmode = &lt;span style="color: #006080;"&gt;"solid"&lt;/span&gt;;&lt;br /&gt;            shademode = &lt;span style="color: #006080;"&gt;"lightsource"&lt;/span&gt;;&lt;br /&gt;            otheta = -45;               &lt;span style="color: #008000;"&gt;// Intial rotation around X axis&lt;/span&gt;&lt;br /&gt;            ophi = 0;                   &lt;span style="color: #008000;"&gt;// Intial rotation around Y Axis            &lt;/span&gt;&lt;br /&gt;            ogamma = 0;                 &lt;span style="color: #008000;"&gt;// Intial roation around Z axis&lt;/span&gt;&lt;br /&gt;            fillstroke = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;          &lt;span style="color: #008000;"&gt;// Fill the model to help prevent seems along edges due to anti-aliasing&lt;/span&gt;&lt;br /&gt;            init(meshPoints, edgeData, vertices);   &lt;span style="color: #008000;"&gt;//Initialize the model&lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Add the object to the controller&lt;/span&gt;&lt;br /&gt;        k3d.addK3DObject(model);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Render the model&lt;/span&gt;&lt;br /&gt;        k3d.tick();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Reset Sliders&lt;/span&gt;&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderX"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, -45);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderY"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderZ"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateX"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateY"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateZ"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The K3D library, when iterating through data in an array, uses a method called forEach. This method is only available in newer browsers. Trying to use this library in Internet Explorer 7 or 8 will result in an error. To get around this error we can easily detect if this method exists for arrays, and if it doesn&amp;rsquo;t, then create the needed method. The following code can be used to do this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!Array.prototype.forEach) {&lt;br /&gt;    Array.prototype.forEach = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (fun) {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; len = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.length;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt; fun != &lt;span style="color: #006080;"&gt;"function"&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; TypeError();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; param = arguments[1];&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; len; i++) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (i &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;) {&lt;br /&gt;                fun.call(param, &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;[i], i, &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    };&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Finally, we will need to add the code to create and initialize the sliders for manipulating the 3D model. The code looks like this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;$(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; createSlider = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (id, min, max, propertyName) {&lt;br /&gt;        $(id).slider({&lt;br /&gt;            orientation: &lt;span style="color: #006080;"&gt;"vertical"&lt;/span&gt;,&lt;br /&gt;            range: &lt;span style="color: #006080;"&gt;"min"&lt;/span&gt;,&lt;br /&gt;            min: min,&lt;br /&gt;            max: max,&lt;br /&gt;            slide: &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;event&lt;/span&gt;, ui) {&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (model) {&lt;br /&gt;                    model[propertyName] = ui.value;&lt;br /&gt;                    k3d.tick();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Create sliders for rotating the model&lt;/span&gt;&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderX"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'otheta'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderY"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'ophi'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderZ"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'ogamma'&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Create Sliders for translating the model&lt;/span&gt;&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateX"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offx'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateY"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offy'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateZ"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offz'&lt;/span&gt;);&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;At this point we have everything we need to generate the 3D elevation model. Open up the web page in a browser and zoom into an area likely to have varying elevations and press the &amp;ldquo;Generate Model&amp;rdquo; button. Below is a screenshot of a rendered 3D elevation model of Niagara Falls.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4265.3DNiagraFalls_5F00_HTML5_5F00_6BF21264.jpg"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="3DNiagraFalls_HTML5" border="0" alt="3DNiagraFalls_HTML5" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8176.3DNiagraFalls_5F00_HTML5_5F00_thumb_5F00_2715C863.jpg" width="550" height="364" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6765.3DFrame_5F00_HTML5_5F00_2FD5AAE2.jpg"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="3DFrame_HTML5" border="0" alt="3DFrame_HTML5" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0844.3DFrame_5F00_HTML5_5F00_thumb_5F00_4CFB52EC.jpg" width="550" height="512" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Full Source Code&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: medium;" size="3"&gt;index.html&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;http-equiv&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='Content-Type'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;content&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='text/html; charset=utf-8'&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='text/javascript'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: #f4f4f4; margin: 0px;"&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!-- jQuery UI libraries for creating Slider controls --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;link&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/css"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;href&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="styles/ui-lightness/jquery-ui-1.8.21.custom.css"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;rel&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="stylesheet"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/jquery-1.7.2.min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/jquery-ui-1.8.21.custom.min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;script type="text/javascript" src="scripts/excanvas.min.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/mathlib-min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/k3d-min.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #006400; font-size: 9pt;" color="#006400"&gt;&amp;lt;!-- Main JavaScript file where we put all our logic for this application --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="line-height: 10pt;"&gt;&lt;span style="font-family: Consolas;" face="Consolas"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;src&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;="scripts/3DElevationModel.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;" color="#800000"&gt;script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9pt;" color="#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;   &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;style&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="text/css"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        .slider&lt;br /&gt;        {&lt;br /&gt;            float:left;&lt;br /&gt;            width:30px;&lt;br /&gt;        }&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onload&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='GetMap();'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='float:left;width:600px'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='myMap'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='position:relative;width:600px;height:400px;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;input&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='button'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='GenerateModel();'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='Generate Model'&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='float:left;width:600px;margin-left:10px;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;canvas&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="canvas"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;width&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="600"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;height&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="400"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="background-color:#fff;"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;canvas&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='width:90px;float:left;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Rotation&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    X&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderX"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Y&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderY"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Z&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="rotateSliderZ"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='width:90px;float:left;'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Translate&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;legend&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    X&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateX"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Y&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateY"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="slider"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    Z&lt;br /&gt;                    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="translateZ"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;fieldset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: medium;" size="3"&gt;3DElevationModel.js&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;span style="color: #008000;"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* This code makes use of the K3D libaray: http://www.kevs3d.co.uk/dev&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;* Documentation for K3D http://en.wikibooks.org/wiki/K3D_JavaScript_Canvas_Library/Tutorial&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; map,            &lt;span style="color: #008000;"&gt;//Reference to Map control&lt;/span&gt;&lt;br /&gt;    canvas,         &lt;span style="color: #008000;"&gt;//Reference to the HTML5 canvas used to render the model&lt;/span&gt;&lt;br /&gt;    sessionKey,     &lt;span style="color: #008000;"&gt;//Bing Maps session key used with REST services&lt;/span&gt;&lt;br /&gt;    mapBounds,      &lt;span style="color: #008000;"&gt;//Area of where elevation data was requested&lt;/span&gt;&lt;br /&gt;    zoom,           &lt;span style="color: #008000;"&gt;//Zoom level used to request elevation data&lt;/span&gt;&lt;br /&gt;    model,          &lt;span style="color: #008000;"&gt;//Reference to the generate model&lt;/span&gt;&lt;br /&gt;    k3d,            &lt;span style="color: #008000;"&gt;//Reference to K3D control&lt;/span&gt;&lt;br /&gt;    numRows = 30,   &lt;span style="color: #008000;"&gt;//Number of rows to use for the elevation samples&lt;/span&gt;&lt;br /&gt;    numCols = 30,   &lt;span style="color: #008000;"&gt;//Number of columns to use for the elevation samples&lt;/span&gt;&lt;br /&gt;    textureColor = [0, 255, 0]; &lt;span style="color: #008000;"&gt;//Color to render the model in&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Add support for the "forEach" method on arrays if the browser does not have support for this. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//This is needed by the k3d library. Notable browsers that need this added are IE7 &amp;amp; IE8.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!Array.prototype.forEach) {&lt;br /&gt;    Array.prototype.forEach = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (fun) {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; len = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.length;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt; fun != &lt;span style="color: #006080;"&gt;"function"&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; TypeError();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; param = arguments[1];&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; len; i++) {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (i &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;) {&lt;br /&gt;                fun.call(param, &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;[i], i, &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    };&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Method used to load the map&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; GetMap() {&lt;br /&gt;    &lt;span style="color: #008000;"&gt;// Initialize the map&lt;/span&gt;&lt;br /&gt;    map = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Map(document.getElementById(&lt;span style="color: #006080;"&gt;'myMap'&lt;/span&gt;),&lt;br /&gt;    {&lt;br /&gt;        credentials: &lt;span style="color: #006080;"&gt;'YOUR_BING_MAPS_KEY'&lt;/span&gt;&lt;br /&gt;        center: &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(43.08, -79.075),&lt;br /&gt;        zoom: 16,&lt;br /&gt;        mapTypeId: Microsoft.Maps.MapTypeId.aerial&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Generate a Bing Maps Session key to make our call to the REST service non-billable.&lt;/span&gt;&lt;br /&gt;    map.getCredentials(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (sKey) {&lt;br /&gt;        sessionKey = sKey;&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Store a reference to the canvas&lt;/span&gt;&lt;br /&gt;    canvas = document.getElementById(&lt;span style="color: #006080;"&gt;'canvas'&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Method used to start the process of generating the 3D elevation model&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; GenerateModel() {&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Clear the Canvas&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; context = canvas.getContext(&lt;span style="color: #006080;"&gt;"2d"&lt;/span&gt;);&lt;br /&gt;    context.clearRect(0, 0, canvas.width, canvas.height);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Get the current zoom level and store it&lt;/span&gt;&lt;br /&gt;    zoom = map.getZoom();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Only generates models when the user is zoomed in at a decent zoom level, otherwise the model will just be a flat sheet.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (zoom &amp;lt; 8) {&lt;br /&gt;        alert(&lt;span style="color: #006080;"&gt;"This zoom level is not supported. Please zoom in closer (&amp;gt;8)."&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    mapBounds = map.getBounds();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Get the elevation data for a bounding box area&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; elevationURL = &lt;span style="color: #006080;"&gt;"http://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds="&lt;/span&gt; +&lt;br /&gt;SigDigit(mapBounds.getSouth(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getWest(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getNorth(), 6) + &lt;span style="color: #006080;"&gt;","&lt;/span&gt; + SigDigit(mapBounds.getEast(), 6) + &lt;span style="color: #006080;"&gt;"&amp;amp;rows="&lt;/span&gt; + numRows + &lt;span style="color: #006080;"&gt;"&amp;amp;cols="&lt;/span&gt; + numCols + &lt;span style="color: #006080;"&gt;"&amp;amp;key="&lt;/span&gt; + sessionKey;&lt;br /&gt;&lt;br /&gt;    CallRestService(elevationURL + &lt;span style="color: #006080;"&gt;"&amp;amp;jsonp=Render3DModel"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//This method generates and renders the 3D model based on the returned elevation data.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; Render3DModel(result) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (result != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets.length &amp;gt; 0 &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0] != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0].resources != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;        result.resourceSets[0].resources.length &amp;gt; 0) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; elevations = result.resourceSets[0].resources[0].elevations;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Get bounding coordinates of map&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; tlLatitude = mapBounds.getNorth();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; brLatitude = mapBounds.getSouth();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; brLongitude = mapBounds.getEast();&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; tlLongitude = mapBounds.getWest();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Calculate the degree spacing between elevation samples&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dLat = Math.abs(tlLatitude - brLatitude) / numRows;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; dLon = Math.abs(tlLongitude - brLongitude) / numCols;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; x, y, z, p, m2p, idx, idx2, idx3, idx4;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; meshPoints = [], edgeData = [], vertices = [];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; r = 0; r &amp;lt; numRows; r++) {&lt;br /&gt;            y = tlLatitude - (dLat * r);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//Calculate meters per pixel for given latitude so we can scale the elevation to pixels&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000;"&gt;//This is based on: http://msdn.microsoft.com/en-us/library/aa940990.aspx&lt;/span&gt;&lt;br /&gt;            m2p = 156543.04 * Math.cos(y * Math.PI / 180) / Math.pow(2, zoom);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; c = 0; c &amp;lt; numCols; c++) {&lt;br /&gt;                idx = r * numCols + c;&lt;br /&gt;&lt;br /&gt;                x = tlLongitude + (dLon * c);&lt;br /&gt;&lt;br /&gt;                z = -elevations[idx] / m2p;&lt;br /&gt;                p = map.tryLocationToPixel(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(y, x));&lt;br /&gt;&lt;br /&gt;                meshPoints.push({ x: p.x, y: p.y, z: z });&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #008000;"&gt;//Create triangles for vreating the mesh model&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (r &amp;lt; numRows - 1 &amp;amp;&amp;amp; c &amp;lt; numCols - 1) {&lt;br /&gt;                    idx2 = idx + 1;&lt;br /&gt;                    idx3 = idx + numCols;&lt;br /&gt;                    idx4 = idx3 + 1;&lt;br /&gt;&lt;br /&gt;                    edgeData.push({ a: idx, b: idx2 });&lt;br /&gt;                    edgeData.push({ a: idx2, b: idx3 });&lt;br /&gt;                    edgeData.push({ a: idx3, b: idx });&lt;br /&gt;                    vertices.push({ vertices: [idx, idx3, idx2], color: textureColor });&lt;br /&gt;&lt;br /&gt;                    edgeData.push({ a: idx2, b: idx4 });&lt;br /&gt;                    edgeData.push({ a: idx4, b: idx3 });&lt;br /&gt;                    edgeData.push({ a: idx3, b: idx2 });&lt;br /&gt;                    vertices.push({ vertices: [idx2, idx3, idx4], color: textureColor });&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Bind a K3D Controller object to the canvas&lt;/span&gt;&lt;br /&gt;        k3d = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; K3D.Controller(canvas, &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;// create a K3D object for rendering&lt;/span&gt;&lt;br /&gt;        model = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; K3D.K3DObject();&lt;br /&gt;        with (model) {&lt;br /&gt;            drawmode = &lt;span style="color: #006080;"&gt;"solid"&lt;/span&gt;;&lt;br /&gt;            shademode = &lt;span style="color: #006080;"&gt;"lightsource"&lt;/span&gt;;&lt;br /&gt;            otheta = -45;               &lt;span style="color: #008000;"&gt;// Intial rotation around X axis&lt;/span&gt;&lt;br /&gt;            ophi = 0;                   &lt;span style="color: #008000;"&gt;// Intial rotation around Y Axis            &lt;/span&gt;&lt;br /&gt;            ogamma = 0;                 &lt;span style="color: #008000;"&gt;// Intial roation around Z axis&lt;/span&gt;&lt;br /&gt;            fillstroke = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;          &lt;span style="color: #008000;"&gt;// Fill the model to help prevent seems along edges due to anti-aliasing&lt;/span&gt;&lt;br /&gt;            init(meshPoints, edgeData, vertices);   &lt;span style="color: #008000;"&gt;//Initialize the model&lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Add the object to the controller&lt;/span&gt;&lt;br /&gt;        k3d.addK3DObject(model);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Render the model&lt;/span&gt;&lt;br /&gt;        k3d.tick();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000;"&gt;//Reset Sliders&lt;/span&gt;&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderX"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, -45);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderY"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#rotateSliderZ"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateX"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateY"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;        $(&lt;span style="color: #006080;"&gt;"#translateZ"&lt;/span&gt;).slider(&lt;span style="color: #006080;"&gt;'value'&lt;/span&gt;, 0);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Create the sliders for rotating and translating the 3D model&lt;/span&gt;&lt;br /&gt;$(&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; createSlider = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (id, min, max, propertyName) {&lt;br /&gt;        $(id).slider({&lt;br /&gt;            orientation: &lt;span style="color: #006080;"&gt;"vertical"&lt;/span&gt;,&lt;br /&gt;            range: &lt;span style="color: #006080;"&gt;"min"&lt;/span&gt;,&lt;br /&gt;            min: min,&lt;br /&gt;            max: max,&lt;br /&gt;            slide: &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;event&lt;/span&gt;, ui) {&lt;br /&gt;                &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (model) {&lt;br /&gt;                    model[propertyName] = ui.value;&lt;br /&gt;                    k3d.tick();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Create sliders for rotating the model&lt;/span&gt;&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderX"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'otheta'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderY"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'ophi'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#rotateSliderZ"&lt;/span&gt;, -180, 180, &lt;span style="color: #006080;"&gt;'ogamma'&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Create Sliders for translating the model&lt;/span&gt;&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateX"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offx'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateY"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offy'&lt;/span&gt;);&lt;br /&gt;    createSlider(&lt;span style="color: #006080;"&gt;"#translateZ"&lt;/span&gt;, -400, 400, &lt;span style="color: #006080;"&gt;'offz'&lt;/span&gt;);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;/***** Helper Methods ****/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Simple method for calling a REST service&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; CallRestService(request) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; script = document.createElement(&lt;span style="color: #006080;"&gt;"script"&lt;/span&gt;);&lt;br /&gt;    script.setAttribute(&lt;span style="color: #006080;"&gt;"type"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;);&lt;br /&gt;    script.setAttribute(&lt;span style="color: #006080;"&gt;"src"&lt;/span&gt;, request);&lt;br /&gt;    document.body.appendChild(script);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;//Simple method that rounds numbers to a certain number of significant digits&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; SigDigit(number, digits) {&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; delta = Math.pow(10, digits);&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; Math.round(number * delta) / delta;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692954&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Bing Maps AJAX Control 7.0" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+AJAX+Control+7-0/default.aspx" /><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="Elevations API" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Elevations+API/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Attend the Bing Maps and SharePoint Solutions Webcast</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/19/upcoming-bing-maps-and-sharepoint-webcast.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/19/upcoming-bing-maps-and-sharepoint-webcast.aspx</id><published>2013-02-19T16:30:00Z</published><updated>2013-02-19T16:30:00Z</updated><content type="html">&lt;h5&gt;&amp;#160;&lt;/h5&gt;  &lt;p&gt;&lt;font color="#333333"&gt;You are invited to attend this webcast to learn how solutions that integrate Bing Maps and SharePoint help organizations gain greater insight from their business data to make smarter business decisions. We will also explore new native geospatial support for SharePoint 2013 and Office 365 (SharePoint in the cloud) which makes it much easier to geocode address data and display with Bing Maps. We’ll explore solution scenarios and tools that illustrate the value of geospatial support in SharePoint when combined with Bing Maps, and look at examples of customers extending their investment in the SharePoint platform by leveraging location and Bing Maps. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;font color="#333333"&gt;You’ll learn what’s included in the Bing Maps platform, and how to take advantage of the data services &amp;amp; imagery and incorporate them into line of business solutions within your organization. We will explore the development options with the platform, and how to get started with Bing Maps and SharePoint 2013/Office 365 development.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font style="font-weight: bold" color="#333333" size="2"&gt;Webcast Details&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Bing Maps and Sharepoint Solutions for the Enterprise (EPG382CAL)" href="https://www.eventbuilder.com/microsoft/event_desc.asp?z=w2e54o&amp;amp;eventid=k9a3t4p8"&gt;Bing Maps and SharePoint Solutions for the Enterprise (EPG382CAL)&lt;/a&gt;&lt;/p&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;&lt;strong&gt;Date/Time:&lt;/strong&gt; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;Tue Feb 26, 2013, 9:00 AM, USA Pacific&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;&lt;strong&gt;Duration:&lt;/strong&gt; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;1 Hour&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;&lt;strong&gt;Presenters:&lt;/strong&gt; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;Mark Merchant, Bing Maps Technical Solution Professional&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;Ricky Brundritt, Bing Maps Technical Solution Professional&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;Scott Caulk, VP of Product Management for IDV Solutions&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#333333"&gt;Steve Milroy, CEO OnTerra Systems&lt;/font&gt;&lt;/h1&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9693048&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="Webcast" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Webcast/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Bing Maps REST Service Tips &amp; Tricks</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/14/bing-maps-rest-service-tips-amp-tricks.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/14/bing-maps-rest-service-tips-amp-tricks.aspx</id><published>2013-02-14T18:00:00Z</published><updated>2013-02-14T18:00:00Z</updated><content type="html">&lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#333333" size="2"&gt;I’ve been a big fan of the Bing Maps REST services since they were first released several years ago and highly recommend trying them out if you haven’t already. The REST services are much newer than the SOAP services, have more features, are faster and can be consumed by non .NET languages with greater ease. If you have the Bing Maps REST services return JSON the response size of a request is significantly smaller than the response size from the same request using the Bing Maps SOAP services. &lt;font color="#333333"&gt;This blog post will go through and highlight some tips for getting the most out of the Bing Maps REST services.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Using the REST services in managed code&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font color="#333333"&gt;I want to take the time to provide a useful resource for those who have had issues consuming the Bing Maps REST Services APIs using .NET. &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#333333"&gt;The documentation on how to consume the JSON responses from the Bing Maps REST services can be found on MSDN &lt;/font&gt;&lt;font color="#333333"&gt;&lt;a href="http://www.bing.com//msdn.microsoft.com/en-us/library/jj819168.aspx" target="_blank"&gt;here&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;u&gt;&lt;/u&gt;&lt;font color="#333333" size="2"&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#333333" size="2"&gt;If you are using Java then take a look at how the REST services are handled in the &lt;/font&gt;&lt;a href="http://bingmapsandroidsdk.codeplex.com/"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;Bing Maps Android SDK&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Geocoding&lt;/font&gt;&lt;/h1&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpFirst"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;Unless you are geocoding English addresses in the US you should specify a culture parameter to help ensure you get the most relevant results. By default, the culture for all requests is set to en-US. If geocoding addresses in the UK, you will find that in some cases using the culture parameter en-GB will return better results. This becomes even more important when geocoding addresses that are not in English. To specify a culture in a REST request simply use “&amp;amp;c=cultureCode” – you can take a look at the complete list of &lt;/font&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh441729.aspx"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;Supported Cultures&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;Encode address and query parameters. This is especially important when working with non-English languages as special characters often will not work correctly. This is also important if you want to use an ampersand (&amp;amp;) in your query. By encoding an ampersand it will appear in the URL as “%26”. Here are the methods that can be used in different programming languages to encode URL parameters.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; margin-left: 41.4pt; border-top: medium none; border-right: medium none; mso-border-alt: solid black 1.0pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableLightList" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: -1; mso-yfti-firstrow: yes; mso-yfti-lastfirstrow: yes"&gt;       &lt;td style="border-bottom: medium none; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-border-left-themecolor: text1; mso-background-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt;Language&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: medium none; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-background-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt;Method&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: medium none; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-top-themecolor: text1; mso-background-themecolor: text1; mso-border-right-themecolor: text1" valign="top" width="308"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt;Example&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 0"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;JavaScript&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64" class="MsoNormal"&gt;&lt;a href="http://www.w3schools.com/jsref/jsref_encodeURI.asp"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#0000ff"&gt;&lt;u&gt;encodeURI&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="308"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;encodeURI(&lt;i style="mso-bidi-font-style: normal"&gt;query&lt;/i&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 1; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: medium none; padding-top: 0in; mso-border-left-themecolor: text1; mso-border-bottom-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 4" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;C#/VB&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: medium none; padding-top: 0in; mso-border-bottom-themecolor: text1" valign="top" width="114"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt" class="MsoNormal"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.uri.aspx"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#0000ff"&gt;&lt;u&gt;Uri&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0in; mso-border-right-themecolor: text1; mso-border-bottom-themecolor: text1" valign="top" width="308"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;Uri.EscapeDataString (&lt;i style="mso-bidi-font-style: normal"&gt;query&lt;/i&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpFirst"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;When geocoding free form queries use the unstructured URL format rather than the structured format. The unstructured URL format tends to be much more successful for these types of queries. Note: the structured format actually overlaps with the reverse geocoding URL request format and can return odd results if your query is just made up of numbers.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; margin-left: 41.4pt; border-top: medium none; border-right: medium none; mso-border-alt: solid black 1.0pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableLightList" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: -1; mso-yfti-firstrow: yes; mso-yfti-lastfirstrow: yes"&gt;       &lt;td style="border-bottom: medium none; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1; mso-background-themecolor: text1" valign="top" width="583"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="color: ; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;font color="#00b050"&gt;&lt;font style="font-size: 11pt"&gt;√&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;font color="#ffffff"&gt;&lt;font style="font-size: 11pt"&gt;&lt;span style="color: ; mso-bidi-font-family: calibri; mso-themecolor: background1; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font style="font-size: 11pt"&gt;Unstructured URL&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="583"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;span style="mso-bidi-font-size: 11.0pt; mso-bidi-font-weight: bold"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 10pt" color="#000000"&gt;http://dev.virtualearth.net/REST/v1/Locations?&lt;b&gt;query=locationQuery&lt;/b&gt;&amp;amp;key=BingMapsKey &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpFirst"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; margin-left: 41.4pt; border-top: medium none; border-right: medium none; mso-border-alt: solid black 1.0pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableLightList" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: -1; mso-yfti-firstrow: yes; mso-yfti-lastfirstrow: yes"&gt;       &lt;td style="border-bottom: medium none; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1; mso-background-themecolor: text1" valign="top" width="583"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5; mso-add-space: auto" class="MsoListParagraphCxSpLast"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;span style="color: "&gt;&lt;font color="#ff0000"&gt;&lt;font style="font-size: 11pt"&gt;X&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt; Structured URL&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="583"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68; mso-add-space: auto" class="MsoListParagraph"&gt;&lt;span style="mso-bidi-font-size: 11.0pt; mso-bidi-font-weight: bold"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 10pt" color="#000000"&gt;http://dev.virtualearth.net/REST/v1/Locations/&lt;b&gt;locationQuery&lt;/b&gt;?key=BingMapsKey &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpFirst"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt" color="#333333"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#333333"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#333333" size="2"&gt;The Bing Maps geocoder will attempt to find the closest match as possible to your query. In some cases, it will not be able to find an exact match. This is where the match code parameter of the returned results becomes useful. The match code parameter is an array of values and can have any combination of the following three values; Good, Ambiguous, and UpHierarchy. If you are only interested in exact matches then keep a look out for UpHierachy as this indicates that your exact query was not found but an upper level address value was found. For example, you attempt to geocode a postal code but instead the associated country is returned as the postal code was not found.&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font color="#333333"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color="#000000" size="2"&gt;&lt;font color="#333333"&gt;If using the REST services from server side code you may find that the results on in your application may differ from the results found when using the services locally. The reason for this is that the REST services take your IP address into consideration when making a request. To help reduce this issue you can set the&lt;/font&gt; &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701704.aspx"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;userIp&lt;/u&gt;&lt;/font&gt;&lt;/i&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;parameter of the request to 127.0.0.1. This will trick the service into thinking you are making the call from a local application and cause it to ignore your IP address.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#000000"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;If you have a lot of data you want to geocode at once consider using the &lt;/font&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701733.aspx"&gt;&lt;font size="2"&gt;Bing Spatial Data Services&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; &lt;font color="#333333"&gt;and the batch geocoding functionality. This service allows you to geocode up to 200,000 addresses in a single request.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Reverse Geocoding&lt;/font&gt;&lt;/h1&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpFirst"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;Limit your coordinates to 6 decimal places. At 6 decimal places you have an accuracy of approximately 10cm on the ground. Any more than 6 decimal places just makes for a longer URL and can confuse the reverse geocoder into thinking this is a free form query search.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt"&gt;&lt;font size="2" face="Arial"&gt;Ensure that your numbers are not being turned into scientific notation format when converting them to string. This occurs quite often when working with small numbers. For example, it is not uncommon for some languages to convert 0.00005 to 5E-5.&lt;span style="mso-spacerun: yes"&gt;&amp;#160; &lt;/span&gt;Scientific notation is not supported by the service and will be interpreted as a free form query&lt;/font&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;Ensure that when converting your coordinates to string that you use an invariant culture. Coordinates that use commas for decimal places will not work correctly. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font color="#333333"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font color="#333333" size="2" face="Arial"&gt;Like the batch geocoder you can also do batch reverse geocoding using the Bing Spatial Data Services if you need to reverse geocode a large number of coordinates in one go.&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Routing&lt;/font&gt;&lt;/h1&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo2" class="MsoListParagraphCxSpFirst"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;Many of the tips in the geocoding service apply for the routing service, like being sure to encode your address locations. However, don’t encode coordinate based locations.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo2" class="MsoListParagraphCxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font color="#333333"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font color="#333333"&gt;The default distance units are in Kilometers. Use the&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701717.aspx"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;distanceUnit&lt;/u&gt;&lt;/font&gt;&lt;/i&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;parameter to change this to miles if that is your preferred unit of measurement. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo2" class="MsoListParagraphCxSpMiddle"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font size="2"&gt;Y&lt;font face="Arial"&gt;ou can now have up to 3 possible routes returned by the routing engine for transit and driving directions in certain countries. This may be desirable in some applications but it is best to make this optional to your users. Although the calculation on Bing Maps end is fast, the response from Bing Maps is much bigger when returning 3 routes, rather than one. This could become an issue for users with slow internet connections (i.e. mobile users).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo2" class="MsoListParagraphCxSpMiddle"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;If using Bing Maps in areas where geocoding coverage is limited consider allowing the user to select their start and end point on the map via a click event or by dragging a pushpin. This will allow you to pass in coordinates for your end points rather than an address. The routing engine is capable of calculating routes anywhere there is road data, even if there is no geocoding coverage.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l2 level1 lfo2" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;If you want to retrieve the coordinates that make up the route line along the roads use the &lt;/font&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff701717.aspx"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;routePathOutput&lt;/u&gt;&lt;/font&gt;&lt;/i&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;parameter.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Imagery Service&lt;/font&gt;&lt;/h1&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo3" class="MsoListParagraphCxSpFirst"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;When requesting a static map image from Bing Maps the imagery service the service will automatically choose the best image format to return the image in for best resolution. Note: this may not be the preferred image type in some cases. For example, the service may return Ordnance Survey maps in PNG format; you may find you prefer these maps returned as JPG of GIF format. You can specify the image type using the &lt;/font&gt;&lt;/font&gt;&lt;a href="http://rbrundritt.wordpress.com/2012/01/06/bing-maps-rest-service-net-libraries/"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;format&lt;/u&gt;&lt;/font&gt;&lt;/i&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;parameter.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo3" class="MsoListParagraphCxSpLast"&gt;&lt;font color="#333333"&gt;&lt;span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size: 11pt"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height: normal; font-family: "&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size: 7pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;The Imagery service can return two different types of metadata. The &lt;/font&gt;&lt;/font&gt;&lt;a href="http://rbrundritt.wordpress.com/2009/08/01/ve-silverlight-control-%e2%80%93-pushpins-infoboxes-and-best-map-view/"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;first type&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;of metadata gives you information about the imagery in Bing Maps for a specific location, zoom level and map type. This is useful if you want to find out the age of the imagery or want to know is a specific type of imagery is available for a certain location. The &lt;/font&gt;&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh667439.aspx"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;second type&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;of metadata is for a static image generated from the imagery service. This second metadata may include information such as pixel coordinates of pushpins on your image. This is useful if you want to be able to tie events to the generated image or create an &lt;/font&gt;&lt;/font&gt;&lt;a href="http://www.w3schools.com/TAGS/tag_map.asp"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;HTML image map&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt; &lt;font color="#333333"&gt;out of it.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height: 16pt; list-style-type: disc; margin: 24pt 0in 0pt"&gt;&lt;font style="font-weight: bold" color="#333333" size="3"&gt;Reducing Usage Transactions &lt;/font&gt;&lt;/h1&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font color="#333333" size="2"&gt;Are you are using the Bing Maps Rest services in conjunction with one of the Bing Maps map controls? If so, you can significantly reduce the number of transactions your application incurs against your Bing Maps account if you request the Bing Maps key from the map control rather than using your normal Bing Maps key. This is quite often an overlooked feature. When getting the credentials from the map you do not get back your original Bing Maps key. Instead, you get a special session key which you can use as a Bing Maps key to make requests to the Bing Maps services. By doing this all transactions incurred by this session key will be non-billable. Here are some examples of how to properly use a session key.&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;&amp;#160;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid black 1.0pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableLightList" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: -1; mso-yfti-firstrow: yes; mso-yfti-lastfirstrow: yes"&gt;       &lt;td style="border-bottom: medium none; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1; mso-background-themecolor: text1" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt;Bing Maps V7 AJAX API&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;function ClickGeocode()&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;map.getCredentials(MakeBingMapsRESTRequest);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;function MakeBingMapsRESTRequest(sessionKey)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;//Generate a request URL for the Bing Maps REST services.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;//Use the session key in the request as the Bing Maps key&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;   &lt;br /&gt;&lt;font color="#333333" size="2"&gt;Full working sample using JavaScript can be found &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg427601.aspx"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;u&gt;here&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#333333" size="2"&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid black 1.0pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableLightList" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: -1; mso-yfti-firstrow: yes; mso-yfti-lastfirstrow: yes"&gt;       &lt;td style="border-bottom: medium none; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: black; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1; mso-background-themecolor: text1" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: ; mso-themecolor: background1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#ffffff"&gt;Bing Maps Silverlight, WPF, WP7, and WinForm API’s&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in; mso-border-themecolor: text1" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;Map.CredentialsProvider.GetCredentials((c) =&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;string sessionKey = c.ApplicationId;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;//Generate a request URL for the Bing Maps REST services.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;font style="font-size: 11pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 11pt"&gt;//Use the session key in the request as the Bing Maps key&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68" class="MsoNormal"&gt;&lt;b&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 11pt" color="#000000"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt; &lt;span style="line-height: 13pt; font-family: ; mso-fareast-font-family: calibri; mso-bidi-font-family: &amp;#39;Times New Roman&amp;#39;; mso-bidi-theme-font: minor-bidi; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 11pt"&gt;       &lt;p style="line-height: 13pt; list-style-type: disc; margin: 0in 0in 10pt" class="MsoNormal"&gt;         &lt;br /&gt;&lt;font color="#333333" size="2"&gt;Full working samples using .NET can be found &lt;/font&gt;&lt;/p&gt;       &lt;a href="http://msdn.microsoft.com/en-us/library/jj819168.aspx"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font color="#0000ff"&gt;&lt;u&gt;&lt;/u&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;.&lt;/font&gt;&lt;/font&gt; &lt;/font&gt;    &lt;p&gt;&lt;font color="#333333"&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/font&gt;&lt;/p&gt; &lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692561&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="REST" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/REST/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>3D Elevation Models with Bing Maps WPF</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/12/3d-elevation-models-with-bing-maps-wpf.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/12/3d-elevation-models-with-bing-maps-wpf.aspx</id><published>2013-02-12T16:00:00Z</published><updated>2013-02-12T16:00:00Z</updated><content type="html">&lt;p&gt;With the release of the &lt;a href="http://msdn.microsoft.com/en-us/library/jj158959.aspx"&gt;Bing Maps REST Elevations service&lt;/a&gt; I started looking into cool and interesting things that can be done with the service. While doing some searching around, I stumbled across an interesting blog post titled &lt;a href="http://alastaira.wordpress.com/2011/01/06/examining-3d-terrain-of-bing-maps-tiles-with-sql-server-2008-and-wpf-part-3/"&gt;Examining 3D Terrain of Bing Maps Tiles with SQL Server 2008 and WPF&lt;/a&gt; by one of our Bing Maps MVP’s which inspired me to see if I could make something similar using this new Elevations service. So with that, I’ve put together this blog posts which demonstrates how to create a tool for generating a 3D model of elevation data and then overlay static imagery over the top. As a teaser, here is a screenshot of a 3D model of Niagara Falls created using this code.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2818.3DNiagraFalls_5F00_1AB1F4F9.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="3DNiagraFalls" border="0" alt="3DNiagraFalls" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4456.3DNiagraFalls_5F00_thumb_5F00_33419249.jpg" width="550" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Setting up the Visual Studio Project&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;To start, we will create a WPF Application project in Visual Studios called BingMaps3DModel_WPF. Once this is done we will want to add references to the following libraries:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;System.Runtime.Serialization &lt;/li&gt;    &lt;li&gt;Microsoft.Maps.MapControl.WPF &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Adding support for the REST based Elevation service&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Since we will be accessing the Bing Maps REST Elevation service from .NET code we will need to add in a library to parse the responses from the service. Rather than writing these from scratch I’ll be making use of some code I helped put together in a previous MSDN article on using Bing Maps &lt;a href="http://msdn.microsoft.com/en-us/library/jj819168.aspx" target="_blank"&gt;REST Service with .NET&lt;/a&gt; Libraries. To include this library into the project we will right click on the project and select &lt;i&gt;Add -&amp;gt; New Item&lt;/i&gt;. Add a class file called &lt;i&gt;BingMapsRESTServices.cs&lt;/i&gt;. Remove any content that’s in this file and copy and paste in the complete code from the bottom of the previous blog post. At this point your project should look something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4150.clip_5F00_image004_5F00_196D5C1A.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 4px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1325.clip_5F00_image004_5F00_thumb_5F00_46529928.png" width="268" height="333" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Creating the User Interface&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;For this application we will want to have two tabs. The first tab will have a map that the user will be able to use to select what area the 3D model should be created for. Once the user has selected the area they are interested in they will be able to press a button to generate the 3D model. Once the model is created the user will be taken to the second tab which will allow the user to view and interact with the 3D model. To make things a bit cleaner we will create a separate user control for the 3D models tab. To do this, right click on the project and select &lt;i&gt;Add -&amp;gt; New Item&lt;/i&gt;. Select “User Control (WPF)” and call it &lt;i&gt;ViewerPanel3D.xaml&lt;/i&gt;.&lt;/p&gt;  &lt;p&gt;With this, we can create the markup for the &lt;i&gt;MainWindow.xaml&lt;/i&gt; file. The XAML should look like this.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 600px; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; word-wrap: break-word; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Window&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BingMaps3DModel_WPF.MainWindow&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #ff0000"&gt;xmlns:m&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #ff0000"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:BingMaps3DModel_WPF&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #ff0000"&gt;Title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;3D Map Generator&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;700&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;800&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TabControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;MyTabs&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TabItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Map&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;m:Map&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;MyMap&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CredentialsProvider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;YOUR_BING_MAPS_KEY&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Mode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;AerialWithLabels&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Generate 3D Map Model&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Click&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Generate3DModel_Click&amp;quot;&lt;/span&gt; &lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;150&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;25&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Right&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;TabItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TabItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;3D Model&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:ViewerPanel3D&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;viewerPanel&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;TabItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;TabControl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Window&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;If you run the application now, it should result in an application that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/1488.3DWPFMap_5F00_25CB5976.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="3DWPFMap" border="0" alt="3DWPFMap" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6685.3DWPFMap_5F00_thumb_5F00_7A1A8F79.jpg" width="550" height="481" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: you may get an error if you haven’t created an instance of the click event for the button. Simply right click on the event name and press “Navigate to Event Handler” to generate the click event code that is needed.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;The ViewerPanel3D User Control&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;We can now turn our attention to the ViewerPanel3D user control that we created and add the needed markup to that. When a model is loaded into this control we will want to give the user several sliders which they can use to rotate and move the model around with. I came across a really nice example in this &lt;a href="http://www.odewit.net/ArticleContent.aspx?id=Wpf3DIntro-0.4&amp;amp;format=html"&gt;blog post&lt;/a&gt; that I thought I would use as a starting point. The nice thing about this example is that it binds the sliders to the rotation transform which means there is no code needed in the background for this functionality. In addition to the sliders for rotating the model we will add a set of sliders for translating (moving in different directions) the model. We will also add a mouse wheel event for zooming in and out of the model. Putting this all together the markup for the &lt;i&gt;ViewerPanel3D.xaml&lt;/i&gt; file should look like this:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 600px; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; word-wrap: break-word; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BingMaps3DModel_WPF.ViewerPanel3D&amp;quot;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt; &lt;br /&gt;             &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt; &lt;br /&gt;             &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt; &lt;br /&gt;             &lt;span style="color: #ff0000"&gt;d:DesignHeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;d:DesignWidth&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{x:Type TextBlock}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;HorizontalAlignment&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;VerticalAlignment&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;slider&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Slider.Orientation&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Vertical&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Slider.Height&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;130.0&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Slider.HorizontalAlignment&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Slider.VerticalAlignment&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Gray&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MouseWheel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;OnViewportMouseWheel&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Viewport3D&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;viewport&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Viewport3D.Camera&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PerspectiveCamera&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;camera&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FarPlaneDistance&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #ff0000"&gt;NearPlaneDistance&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;LookDirection&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,-10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;UpDirection&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,1,0&amp;quot;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #ff0000"&gt;Position&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,5&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FieldOfView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;45&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PerspectiveCamera.Transform&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Transform3DGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;AxisAngleRotation3D&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Axis&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1.0, 0.0, 0.0&amp;quot;&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Angle&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderX, Path=Value}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;AxisAngleRotation3D&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Axis&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.0, 1.0, 0.0&amp;quot;&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Angle&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderY, Path=Value}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;AxisAngleRotation3D&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Axis&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.0, 0.0, 1.0&amp;quot;&lt;/span&gt; &lt;br /&gt;                                    &lt;span style="color: #ff0000"&gt;Angle&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderZ, Path=Value}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D.Rotation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;RotateTransform3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TranslateTransform3D&lt;/span&gt; &lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;OffsetX&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=transSliderX, Path=Value}&amp;quot;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;OffsetY&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=transSliderY, Path=Value}&amp;quot;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;OffsetZ&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=transSliderZ, Path=Value}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ScaleTransform3D&lt;/span&gt; &lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;ScaleX&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderZoom, Path=Value}&amp;quot;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;ScaleY&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderZoom, Path=Value}&amp;quot;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #ff0000"&gt;ScaleZ&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding ElementName=sliderZoom, Path=Value}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Transform3DGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;PerspectiveCamera.Transform&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;PerspectiveCamera&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Viewport3D.Camera&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;model&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D.Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Model3DGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;group&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;AmbientLight&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Color&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;DarkGray&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DirectionalLight&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Color&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;DarkGray&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Direction&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10,10,5&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Model3DGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D.Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ModelVisual3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Viewport3D&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;LightGray&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Rotation&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;4.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;X&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Y&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Z&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;sliderX&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;360.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;230&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Rotate around X-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;sliderY&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-180.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;180.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Rotate around Y-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;sliderZ&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-180.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;180.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Rotate around Z-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Translate&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;4.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;X&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Y&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Z&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;transSliderX&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Translate along the X-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;transSliderY&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Translate along the Y-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;transSliderZ&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Translate along the Z-Axis&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider.ToolTip&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Zoom&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;4.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Slider&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;sliderZoom&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsDirectionReversed&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Minimum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.01&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Maximum&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.8&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource slider}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;GroupBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;
We can now add the method that will handle the mouse wheel event to zoom the model accordingly. To do this, we can right click on the mouse wheel event name and press “Navigate to Event Handler.” This will generate the mouse wheel event code that is needed. We can then add in a bit of logic for setting the value of the zoom slider which will in turn zoom the model as there is a binding connected to the slider. The code for the file &lt;i&gt;ViewerPanel3D.xaml.cs&lt;/i&gt; should look like this: 

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 600px; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; word-wrap: break-word; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; BingMaps3DModel_WPF&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// Interaction logic for ViewerPanel3D.xaml&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ViewerPanel3D : UserControl&lt;br /&gt;    {       &lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ViewerPanel3D()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnViewportMouseWheel(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, MouseWheelEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            sliderZoom.Value -= (&lt;span style="color: #0000ff"&gt;double&lt;/span&gt;)e.Delta / 1000;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;
If we run the application and go to the 3D model tab we should see something that looks like this. 

&lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0564.3DWPFFrame_5F00_163821DA.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="3DWPFFrame" border="0" alt="3DWPFFrame" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4520.3DWPFFrame_5F00_thumb_5F00_2A513E63.jpg" width="554" height="485" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Generating the Model&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Having a nice panel for viewing the model is a good start but doesn’t really do us much good without having a 3D model to view. To create the 3D model we will need to do the following:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;(1) Get a static map image for the based on the center point and zoom level of the map. To keep things easy, we will make keep the width and height of the image equal to 800 pixels. &lt;/p&gt;

  &lt;p&gt;(2) Based on the center point, zoom level and imagery size we will then need to calculate the bounding box of the image as we will need it to request the elevation data. &lt;/p&gt;

  &lt;p&gt;(3) Make a request for the elevation data for the bounding box we created. Again, to keep things simple we will specify that the data points be evenly distributed over 30 rows and columns. This will result in 900 elevation data points being returned which is under the 1000 elevation data point limit. &lt;/p&gt;

  &lt;p&gt;(4) We need to loop through all the elevation data, calculate the relative coordinate, and then convert this coordinate to a pixel coordinate. We will also need to convert the elevation into a pixel length and then scale these values down relative to the size of the map. &lt;/p&gt;

  &lt;p&gt;(5) Now we can create a 3D Mesh Geometry out of the data. To do this, we will need to specify all the data points as 3 dimensional coordinates, and then specify the texture coordinates used to map the static map image to the mesh. We will also need to specify the point indices used to create the triangles needed for the mesh. &lt;/p&gt;

  &lt;p&gt;(6) As a final step, we will create a Geometry Model out of the 3D Mesh and set the static image as the material to be overlaid on top of it. This model can then be passed into our ViewerPanel3D user control. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most of the math used to work with the pixel coordinates are based off of these two articles: &lt;a href="http://msdn.microsoft.com/en-us/library/bb259689.aspx"&gt;Bing Maps Tile System&lt;/a&gt;, and &lt;a href="http://rbrundritt.wordpress.com/2008/10/25/ve-imagery-service-and-custom-icons/"&gt;VE Imagery Service and Custom Icons&lt;/a&gt;. Putting all the above tasks together and adding them to the &lt;i&gt;MainWindow.xaml.cs&lt;/i&gt; file you should end up with a code for the &lt;i&gt;MainWindow.xaml &lt;/i&gt;file that looks like this:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 600px; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; word-wrap: break-word; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Runtime.Serialization.Json;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Imaging;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Media3D;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; BingMapsRESTService.Common.JSON;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; BingMaps3DModel_WPF&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// Interaction logic for MainWindow.xaml&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; MainWindow : Window&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#region&lt;/span&gt; Private Properties&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; sessionBingMapsKey;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; GeometryModel3D mGeometry;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; mapSize = 800;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; topLeftX;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; topLeftY;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; zoom;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#endregion&lt;/span&gt;        &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#region&lt;/span&gt; Constructor&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; MainWindow()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;&lt;br /&gt;            MyMap.CredentialsProvider.GetCredentials((x) =&amp;gt;&lt;br /&gt;            {&lt;br /&gt;                sessionBingMapsKey = x.ApplicationId;&lt;br /&gt;            });&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#endregion&lt;/span&gt;   &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#region&lt;/span&gt; Button Event Handler&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Generate3DModel_Click(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; cLat = MyMap.Center.Latitude;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; cLon = MyMap.Center.Longitude;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Round off the zoom level to the nearest integer as an integer zoom level is needed for the REST Imagery service&lt;/span&gt;&lt;br /&gt;            zoom = Math.Round(MyMap.ZoomLevel);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Only generate models when the user is zoomed in at a decent zoom level, otherwise the model will just be a flat sheet.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (zoom &amp;lt; 8)&lt;br /&gt;            {&lt;br /&gt;                MessageBox.Show(&lt;span style="color: #006080"&gt;&amp;quot;This zoom level is not supported. Please zoom in closer (&amp;gt;8).&amp;quot;&lt;/span&gt;);&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Clear current model from the viewer panel&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (mGeometry != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                viewerPanel.group.Children.Remove(mGeometry);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Open up the 3D model tab&lt;/span&gt;&lt;br /&gt;            MyTabs.SelectedIndex = 1;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Calculate bounding box of image for specified zoom level and center point for map dimensions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Retrieve image of map dimensions for the specified zoom level and center point.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; imgUrl = &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;&amp;quot;http://dev.virtualearth.net/REST/v1/Imagery/Map/Aerial/{0},{1}/{2}?mapSize={3},{4}&amp;amp;key={5}&amp;quot;&lt;/span&gt;,&lt;br /&gt;                cLat,&lt;br /&gt;                cLon,&lt;br /&gt;                zoom,&lt;br /&gt;                mapSize,&lt;br /&gt;                mapSize,&lt;br /&gt;                sessionBingMapsKey);&lt;br /&gt;&lt;br /&gt;            ImageBrush imgBrush = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ImageBrush();&lt;br /&gt;            imgBrush.ImageSource = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BitmapImage(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(imgUrl));&lt;br /&gt;&lt;br /&gt;            DiffuseMaterial material = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DiffuseMaterial(imgBrush);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//calcuate pixel coordinates of center point of map&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; sinLatitudeCenter = Math.Sin(cLat * Math.PI / 180);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; pixelXCenter = ((cLon + 180) / 360) * 256 * Math.Pow(2, zoom);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; pixelYCenter = (0.5 - Math.Log((1 + sinLatitudeCenter) / (1 - sinLatitudeCenter)) / (4 * Math.PI)) * 256 * Math.Pow(2, zoom);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//calculate top left corner pixel coordiates of map image&lt;/span&gt;&lt;br /&gt;            topLeftX = pixelXCenter - (mapSize / 2);&lt;br /&gt;            topLeftY = pixelYCenter - (mapSize / 2);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Calculate bounding coordinates of map view&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; brLongitude, brLatitude, tlLongitude, tlLatitude;&lt;br /&gt;&lt;br /&gt;            PixelToLatLong(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Windows.Point(900, 800), &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; brLatitude, &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; brLongitude);&lt;br /&gt;            PixelToLatLong(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Windows.Point(0, 0), &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; tlLatitude, &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; tlLongitude);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Retrieve elevation data for the specified bounding box&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Rows * Cols &amp;lt;= 1000 -&amp;gt; Let R = C = 30&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; elevationUrl = &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;&amp;quot;http://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds={0},{1},{2},{3}&amp;amp;rows=30&amp;amp;cols=30&amp;amp;key={4}&amp;quot;&lt;/span&gt;,&lt;br /&gt;                brLatitude,&lt;br /&gt;                tlLongitude,&lt;br /&gt;                tlLatitude,&lt;br /&gt;                brLongitude,&lt;br /&gt;                sessionBingMapsKey);&lt;br /&gt;&lt;br /&gt;            WebClient wc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; WebClient();&lt;br /&gt;            wc.OpenReadCompleted += (s, a) =&amp;gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (Stream stream = a.Result)&lt;br /&gt;                {&lt;br /&gt;                    DataContractJsonSerializer ser = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataContractJsonSerializer(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(Response));&lt;br /&gt;                    Response response = ser.ReadObject(stream) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Response;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (response != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; &lt;br /&gt;                        response.ResourceSets != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;                        response.ResourceSets.Length &amp;gt; 0 &amp;amp;&amp;amp;&lt;br /&gt;                        response.ResourceSets[0] != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;                        response.ResourceSets[0].Resources != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;                        response.ResourceSets[0].Resources.Length &amp;gt; 0)&lt;br /&gt;                    {&lt;br /&gt;                        ElevationData elevationData = response.ResourceSets[0].Resources[0] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; ElevationData;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #008000"&gt;//Map elevation data to 3D Mesh&lt;/span&gt;&lt;br /&gt;                        MeshGeometry3D mesh = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MeshGeometry3D();&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; dLat = Math.Abs(tlLatitude - brLatitude) / 30;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; dLon = Math.Abs(tlLongitude - brLongitude) / 30;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; x, y, m2p;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; r = 0; r &amp;lt; 30; r++)&lt;br /&gt;                        {&lt;br /&gt;                            y = tlLatitude + (dLat * r);&lt;br /&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; c = 0; c &amp;lt; 30; c++)&lt;br /&gt;                            {&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; idx = r * 30 + c;&lt;br /&gt;&lt;br /&gt;                                x = tlLongitude + (dLon * c);&lt;br /&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; z = -elevationData.Elevations[idx];&lt;br /&gt;&lt;br /&gt;                                m2p = 156543.04 * Math.Cos(y * Math.PI / 180) / Math.Pow(2, zoom);&lt;br /&gt;&lt;br /&gt;                                System.Windows.Point p = LatLongToPixel(y, x);&lt;br /&gt;                                p.X = (p.X - 400) / mapSize;&lt;br /&gt;                                p.Y = (p.Y + 400) / mapSize;&lt;br /&gt;&lt;br /&gt;                                mesh.Positions.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Point3D(p.X, p.Y, z / mapSize / m2p));&lt;br /&gt;&lt;br /&gt;                                mesh.TextureCoordinates.Add(p);&lt;br /&gt;&lt;br /&gt;                                &lt;span style="color: #008000"&gt;//Create triangles for model&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (r &amp;lt; 29 &amp;amp;&amp;amp; c &amp;lt; 29)&lt;br /&gt;                                {&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx);&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx + 1);&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx + 30);&lt;br /&gt;&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx + 1);&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx + 31);&lt;br /&gt;                                    mesh.TriangleIndices.Add(idx + 30);&lt;br /&gt;                                }&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #008000"&gt;//Add 3D mesh to view panel&lt;/span&gt;&lt;br /&gt;                        mGeometry = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; GeometryModel3D(mesh, material);&lt;br /&gt;                        mGeometry.Transform = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Transform3DGroup();&lt;br /&gt;                        viewerPanel.group.Children.Add(mGeometry);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            };&lt;br /&gt;&lt;br /&gt;            wc.OpenReadAsync(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(elevationUrl));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#region&lt;/span&gt; Helper Methods&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; System.Windows.Point LatLongToPixel(&lt;span style="color: #0000ff"&gt;double&lt;/span&gt; latitude, &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; longitude)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #008000"&gt;//Formulas based on following article:&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//http://msdn.microsoft.com/en-us/library/bb259689.aspx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//calculate pixel coordinate of location&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; sinLatitude = Math.Sin(latitude * Math.PI / 180);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; pixelX = ((longitude + 180) / 360) * 256 * Math.Pow(2, zoom);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; pixelY = (0.5 - Math.Log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI)) * 256 * Math.Pow(2, zoom);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//calculate relative pixel cooridnates of location&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; x = pixelX - topLeftX;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; y = pixelY - topLeftY;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Windows.Point((&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;)Math.Floor(x), (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;)Math.Floor(y));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; PixelToLatLong(System.Windows.Point pixel, &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; lat, &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; lon)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; x = topLeftX + pixel.X;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; y = topLeftY + pixel.Y;&lt;br /&gt;&lt;br /&gt;            lon = (x * 360) / (256 * Math.Pow(2, zoom)) - 180;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; efactor = Math.Exp((0.5 - y / 256 / Math.Pow(2, zoom)) * 4 * Math.PI);&lt;br /&gt;&lt;br /&gt;            lat = Math.Asin((efactor - 1) / (efactor + 1)) * 180 / Math.PI;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #cc6633"&gt;#endregion&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;
You should now be able to run the application. Give it a go and zoom into an area where there is a good chance of being varying elevations. I find using a zoom level between 15 and 19 works best. If you don’t see a model generated, try zooming out or translating along the Z axis. 

&lt;p&gt;Here is a screenshot of my finished application with the generated 3D model of a section of the &lt;a href="http://binged.it/P5ZRIM"&gt;Grand Canyon&lt;/a&gt;. Nice, right?&lt;/p&gt;

&lt;p align="center"&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2045.GrandCanyon_5F00_78CBBC78.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="GrandCanyon" border="0" alt="GrandCanyon" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/7824.GrandCanyon_5F00_thumb_5F00_1EC16CCF.jpg" width="550" height="482" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692558&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="REST" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/REST/default.aspx" /><category term="Elevations API" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Elevations+API/default.aspx" /><category term="WPF Control" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/WPF+Control/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Geocoding and Routing in Bing Maps Windows Store Apps (JavaScript)</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/06/geocoding-and-routing-in-bing-maps-windows-store-apps-javascript.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/02/06/geocoding-and-routing-in-bing-maps-windows-store-apps-javascript.aspx</id><published>2013-02-06T16:20:00Z</published><updated>2013-02-06T16:20:00Z</updated><content type="html">&lt;p&gt;In this blog post we are going to look at how implement Geocoding and Routing using the Bing Maps Windows Store App JavaScript SDK. If you are new to JavaScript development with the Bing Maps Windows Store App SDK I recommend reading the &lt;a href="http://www.bing.com/community/Site_Blogs/b/maps/archive/2012/10/16/getting-started-with-bing-maps-windows-store-apps-javascript.aspx"&gt;Getting started with Bing Maps Windows Store Apps&lt;/a&gt; blog post first. We will also be making use of Bing Maps Modules. If you are unfamiliar with modules, I recommend reading the blog post: &lt;a href="http://www.bing.com/community/Site_Blogs/b/maps/archive/2012/12/05/modules-in-bing-maps-windows-store-apps-javascript.aspx"&gt;Modules in Bing Maps Windows Store Apps&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Geocoding is one of the most common tasks done by users of online maps. Geocoding is the process of taking an address or query and returning its equivalent coordinate on the map. Routing is the task of calculating the directions between two or more locations. In Bing Maps there are a lot of different options around routing such as routing by different modes of transportation; driving, walking, or transit. In Bing Maps there are several ways to carry out these tasks. The most common method is to use the Bing Maps REST services which are very easy to use from just about any programming language. In the JavaScript version of Bing Maps there a modules which wraps the REST services and exposes it as an easy to use JavaScript library. We will be making use of the &lt;a href="http://msdn.microsoft.com/en-us/library/hh868062.aspx"&gt;Search module&lt;/a&gt; for geocoding and the &lt;a href="http://msdn.microsoft.com/en-us/library/hh312802.aspx"&gt;Directions module&lt;/a&gt; for routing.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Setting up the project&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;To set up the project open Visual Studios 2012 and create a new project. In the window that opens select &lt;b&gt;&lt;i&gt;JavaScript&lt;/i&gt;&lt;/b&gt; -&amp;gt; &lt;b&gt;&lt;i&gt;Windows Store&lt;/i&gt;&lt;/b&gt;. Select the &lt;b&gt;&lt;i&gt;Blank App&lt;/i&gt;&lt;/b&gt; template, call the application &lt;b&gt;&lt;i&gt;BingMapsSearch_WinRTJS &lt;/i&gt;&lt;/b&gt;and press OK.&lt;/p&gt;  &lt;p&gt;To keep things clean, we are going to create a separate CSS Style Sheet and JavaScript file for our application. To do this, right click on the &lt;b&gt;&lt;i&gt;js&lt;/i&gt;&lt;/b&gt; folder and select &lt;b&gt;&lt;i&gt;Add&lt;/i&gt;&lt;/b&gt;&lt;i&gt; -&amp;gt; &lt;b&gt;New Item&lt;/b&gt;&lt;/i&gt;. Create a new JavaScript file called &lt;b&gt;&lt;i&gt;BingMapsSearch.js&lt;/i&gt;&lt;/b&gt;. Then, right click on the &lt;b&gt;&lt;i&gt;css&lt;/i&gt;&lt;/b&gt; folder and select &lt;em&gt;&lt;b&gt;Add&lt;/b&gt; -&amp;gt; &lt;strong&gt;New Item&lt;/strong&gt;&lt;/em&gt; and create a new Style Sheet called &lt;b&gt;&lt;i&gt;BingMapsSearch.css&lt;/i&gt;&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;At this point your Solution should look something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/8132.Win8_5F00_Project_5F00_Geo_5F00_37E6B6D2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Win8_Project_Geo" border="0" alt="Win8_Project_Geo" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5076.Win8_5F00_Project_5F00_Geo_5F00_thumb_5F00_0B5D86EC.jpg" width="254" height="298" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, you’ll want to add a reference to the Bing Maps JavaScript library. Right click on the &lt;b&gt;&lt;i&gt;References&lt;/i&gt;&lt;/b&gt; folder and press &lt;b&gt;&lt;i&gt;Add Reference&lt;/i&gt;&lt;/b&gt;. Then select &lt;b&gt;&lt;i&gt;Windows&lt;/i&gt;&lt;/b&gt; -&amp;gt; &lt;b&gt;&lt;i&gt;Extensions&lt;/i&gt;&lt;/b&gt; and select &lt;b&gt;&lt;i&gt;Bing Maps for JavaScript&lt;/i&gt;.&lt;/b&gt; If you do not see this option, you may want to verify that you have installed the Bing Maps for Windows Store App SDK .&lt;/p&gt;  &lt;p&gt;We can now open up the &lt;b&gt;&lt;i&gt;default.html&lt;/i&gt;&lt;/b&gt; file and add references to the Bing Maps SDK along with references to our CSS Style Sheet and JavaScript file. To do this, simply add the following in the head of the page: &lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Bing Maps references --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapicore.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapimodules.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Our Bing Maps CSS &amp;amp; JavaScript Code --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/css/BingMapsSearch.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/js/BingMapsSearch.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;     &lt;br /&gt;Creating the UI Layout&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Before we worry about how to do all the programming of the logic required for this application, let’s first focus on creating the UI. For this app we are going to have a panel on the left side where all our input controls will reside and the map will fill up the rest of the space to the right. In the left frame we will have Clear Map button, an area for inputting geocode and route requests, and a div for rendering routing itineraries. The geocode input area will consist of a single textbox and a button. The routing input area will have two textboxes and a button. The HTML for the &lt;b&gt;&lt;i&gt;default.html&lt;/i&gt;&lt;/b&gt; file should look like this: &lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;!&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;DOCTYPE&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;head&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;meta&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;charset&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;utf-8&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;title&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;BingMapsSearch_WinRTJS&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;title&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- WinJS references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/css/ui-dark.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/js/base.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/js/ui.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- BingMapsSearch_WinRTJS references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/css/default.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/js/default.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Bing Maps references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapicore.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapimodules.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Our Bing Maps CSS &amp;amp; JavaScript Code --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/css/BingMapsSearch.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/js/BingMapsSearch.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;head&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;=&amp;quot;leftFrame&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Clear Map Button--&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;height&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;30px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;onclick&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ClearMap();&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;greenBtn&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;Clear Map&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Geocoding Input --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;height&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;100px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;h2&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;Geocode&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;h2&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;input&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;searchTbx&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;240px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;onclick&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Geocode();&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;greenBtn&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;Go&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Routing Input --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;height&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;150px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;h2&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;Route&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;h2&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;From: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;input&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;fromTbx&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;200px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;To: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;input&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;toTbx&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;margin-left&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;17px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;200px&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;onclick&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;GetRoute();&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;greenBtn&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;Get Directions&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;button&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Route Itinerary Area --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;itineraryDiv&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#006400"&gt;&amp;lt;!-- Map Area--&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;myMap&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;To keep things clean we will add some of the styling information into the &lt;b&gt;&lt;i&gt;BingMapsSearch.css&lt;/i&gt;&lt;/b&gt; file. Add the following to this file:&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;&lt;font style="font-size: 9pt"&gt;.leftFrame&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;position&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;absolute&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;height&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;100%&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;260px&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;padding&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;10px&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;background-color&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;#808080&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;overflow-y&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;auto&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;&lt;font style="font-size: 9pt"&gt;.greenBtn&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;background-color&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;green&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;float&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;right&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;margin-right&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;15px&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;&lt;font style="font-size: 9pt"&gt;#myMap&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;position&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;absolute&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;100%&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;height&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;100%&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;margin-left&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;280px&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#800000"&gt;&lt;font style="font-size: 9pt"&gt;#itineraryDiv&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;position&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;absolute&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#ff0000"&gt;width&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;240px&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;At this point we can run the application and see what it looks like. You should end up with something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3808.Win8_5F00_Geo_5F00_layout_5F00_34851F2A.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Win8_Geo_layout" border="0" alt="Win8_Geo_layout" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/6523.Win8_5F00_Geo_5F00_layout_5F00_thumb_5F00_619A0BF8.jpg" width="554" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note that the map does not appear as we have not yet added the logic to load it. Also, since we haven’t wired up any of the functionality for the buttons, clicking on them now would throw an error.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Loading the Bing Maps Control&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We will add the functionality to load the Bing Maps control to the &lt;b&gt;&lt;i&gt;BingMapsSearch.js&lt;/i&gt;&lt;/b&gt; file. We are now going to create three global variables called: &lt;b&gt;&lt;i&gt;map&lt;/i&gt;&lt;/b&gt;, &lt;b&gt;&lt;i&gt;searchManager&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;directionsManager&lt;/i&gt;&lt;/b&gt;. Next, we will create a function called &lt;b&gt;&lt;i&gt;GetMap&lt;/i&gt;&lt;/b&gt; which will load the Bing Maps control for us. The &lt;b&gt;&lt;i&gt;GetMap&lt;/i&gt;&lt;/b&gt; function will be loaded after the &lt;b&gt;&lt;i&gt;Microsoft.Maps.Map&lt;/i&gt;&lt;/b&gt; module has completed loading. Your code should look like this:&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; map, searchManager, directionsManager;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; GetMap() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; mapOptions =&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;credentials: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;YOUR_BING_MAPS_KEY&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;zoom: 2&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;};&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;map = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; Microsoft.Maps.Map(document.getElementById(&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;myMap&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;), mapOptions);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Initialization logic for loading the map control&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; () {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; initialize() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.loadModule(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'Microsoft.Maps.Map'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, { callback: GetMap });&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;document.addEventListener(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;DOMContentLoaded&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;, initialize, &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;})();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;     &lt;br /&gt;Adding the Geocoding Logic&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When a user adds content to the &lt;b&gt;&lt;i&gt;searchTbx&lt;/i&gt;&lt;/b&gt; textbox and presses the &lt;b&gt;&lt;i&gt;Go&lt;/i&gt;&lt;/b&gt; button a request will be fired to a &lt;b&gt;&lt;i&gt;Geocode&lt;/i&gt;&lt;/b&gt; function. For this functionality we will be making use of the &lt;a href="http://msdn.microsoft.com/en-us/library/hh868062.aspx"&gt;Search module&lt;/a&gt;. The first thing we will do in this function is check to see if the &lt;b&gt;&lt;i&gt;searchManager&lt;/i&gt;&lt;/b&gt; variable has been initialized. If it hasn’t, we will load the Search module and initialize this variable and then process the search request. If this variable has been initialized, we will then create a geocode request passing in the users input value and requests a maximum of 1 result. We will also pass in the names of callback functions that get called if the request is successful or not. &lt;/p&gt;  &lt;p&gt;If the request is successful we will display the result on the map with a pushpin and zoom into the location. If it is not successful, we will alert the user. The request will then be geocoded against the search manager. I would like to take a moment to point out that the &lt;b&gt;&lt;i&gt;alert&lt;/i&gt;&lt;/b&gt; JavaScript function that is commonly used in web development is not supported in Windows Store Apps. Instead, we need to make use of the &lt;b&gt;&lt;i&gt;Windows.UI.Popups.MessageDialog&lt;/i&gt;&lt;/b&gt; class. And since this is likely something we will want to use regularly, we will create a simple function for displaying messages to the user called &lt;b&gt;&lt;i&gt;ShowMessage&lt;/i&gt;&lt;/b&gt;. Add the following code to the &lt;b&gt;&lt;i&gt;BingMapsSearch.js&lt;/i&gt;&lt;/b&gt; file. &lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; GeocodeModule() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;ClearMap();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (searchManager) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; request = { &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;where: document.getElementById(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'searchTbx'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;).value,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;count:1,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;callback: geocodeCallback, &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;errorCallback: geocodeError&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;};&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;searchManager.geocode(request);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Load the Search module and create a search manager.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.loadModule(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'Microsoft.Maps.Search'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;callback: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; () {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Create the search manager&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;searchManager = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; Microsoft.Maps.Search.SearchManager(map);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Perfrom search logic&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Geocode();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; geocodeCallback(response, userData) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (response &amp;amp;&amp;amp;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;response.results &amp;amp;&amp;amp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;response.results.length &amp;gt; 0) {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; r = response.results[0];&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; l = &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; Microsoft.Maps.Location(r.location.latitude, r.location.longitude);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#008000"&gt;&lt;font style="font-size: 9pt"&gt;//Display result on map&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; p = &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; Microsoft.Maps.Pushpin(l);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;map.entities.push(p);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Zoom to result&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;map.setView({ center: l, zoom : 15 });&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;ShowMessage(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;Geocode Response&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;Not results found.&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; geocodeError(request) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;ShowMessage(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;Geocode Error&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;Unable to Geocode request.&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: ; color: ; mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: ; color: ; mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-highlight: white"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-highlight: white"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt; ShowMessage(title, msg) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-highlight: white"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="mso-highlight: white"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-highlight: white"&gt;&lt;font color="#000000"&gt; m = &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-highlight: white"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-highlight: white"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt; Windows.UI.Popups.MessageDialog(title, msg);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-highlight: white"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;m.showAsync();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-highlight: white"&gt;&lt;font style="font-size: 9.5pt" color="#000000" face="Consolas"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt; &lt;b&gt;   &lt;p&gt;     &lt;br /&gt;Adding the Routing Logic&lt;/p&gt; &lt;/b&gt;  &lt;p&gt;When a user adds content to the f&lt;b&gt;&lt;i&gt;romTbx &lt;/i&gt;&lt;/b&gt;and&lt;b&gt;&lt;i&gt; toTbx&lt;/i&gt;&lt;/b&gt; textboxes and presses the &lt;b&gt;&lt;i&gt;Get Directions&lt;/i&gt;&lt;/b&gt; button a request will be fired to a&lt;b&gt;&lt;i&gt; GetRoute&lt;/i&gt;&lt;/b&gt; function. For this functionality we will be making use of the &lt;a href="http://msdn.microsoft.com/en-us/library/hh312802.aspx"&gt;Directions module&lt;/a&gt;. The first thing we want to do in this function is to verify that the &lt;b&gt;&lt;i&gt;directionsManager&lt;/i&gt;&lt;/b&gt; variable has been initialized. If it hasn’t, we will load the Directions module and initialize this variable and then process the route request. If this variable has been initialized, we will then pass the start and end points to the directions manager and pass in the itinerary div id as the location to display the directions. We will then have the directions manager calculate the directions. Add the following code to the &lt;b&gt;&lt;i&gt;BingMapsSearch.js&lt;/i&gt;&lt;/b&gt; file. &lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; GetRoute() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;ClearMap();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (directionsManager) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;// Set Route Mode to driving &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.setRequestOptions({ routeMode: Microsoft.Maps.Directions.RouteMode.driving });&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;// Create start and end waypoints&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; startWaypoint = &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; Microsoft.Maps.Directions.Waypoint({ address: document.getElementById(&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'fromTbx'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;).value });&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; endWaypoint = &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt; Microsoft.Maps.Directions.Waypoint({ address: document.getElementById(&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'toTbx'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;).value });&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.addWaypoint(startWaypoint);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.addWaypoint(endWaypoint);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;// Set the id of the div to use to display the directions&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.setRenderOptions({ itineraryContainer: document.getElementById(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'itineraryDiv'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;) });&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;// Calculate directions, which displays a route on the map&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.calculateDirections();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Load the Directions module and create a directions manager.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.loadModule(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#a31515"&gt;'Microsoft.Maps.Directions'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;callback: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; () {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Create the directions manager&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; Microsoft.Maps.Directions.DirectionsManager(map);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Perfrom route logic&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;GetRoute();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The directions manager takes care of notifying the user if there is an issue calculating the route such as one of the route points having ambiguous results. This saves use a lot of time as we won’t have to worry about handling and developing this functionality. Additionally, this gives us the ability to easily drag the route if we want to customize it or avoid an area. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Clearing the Map&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Whenever we process a new geocode or route request we will want to clear the map. We will also need to create a function named &lt;b&gt;&lt;i&gt;ClearMap &lt;/i&gt;&lt;/b&gt;as this is needed for the Clear Map button. When this function is called we will want to remove any entities from the map and reset the directions manager. This is rather simple to do, just add the following code to the &lt;b&gt;&lt;i&gt;BingMapsSearch.js&lt;/i&gt;&lt;/b&gt; file.&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; ClearMap() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;map.entities.clear();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (directionsManager) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;directionsManager.resetDirections();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="mso-bidi-font-size: 9.5pt"&gt;&lt;font style="font-size: 9pt" color="#000000" face="Consolas"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;Running the App&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At this point we have created all the functionality needed for the UI we created originally. If you run the app now you can make geocode and routing requests. Here is a screen shot of the app with a route from New York to Toronto.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/2068.Win8_5F00_Geo_5F00_complete_5F00_0723895A.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Win8_Geo_complete" border="0" alt="Win8_Geo_complete" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0827.Win8_5F00_Geo_5F00_complete_5F00_thumb_5F00_69155598.jpg" width="554" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9691975&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Windows 8" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Windows+8/default.aspx" /><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="Bing Maps for Windows Store Apps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+for+Windows+Store+Apps/default.aspx" /><category term="Code Samples" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Code+Samples/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Venue Maps in Windows Store Apps (JavaScript)</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/01/31/venues-maps-in-windows-store-apps-javascript.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/01/31/venues-maps-in-windows-store-apps-javascript.aspx</id><published>2013-01-31T15:30:00Z</published><updated>2013-01-31T15:30:00Z</updated><content type="html">&lt;p&gt;Within Bing Maps you have the ability to view Venue Maps. Venue Maps are often thought of as maps of indoor structures such as malls and airports; however, venue maps can be opened up to so much more. A few examples of other types of venue maps include: the layout of shopping districts, stadiums, race courses, and universities.&lt;/p&gt;  &lt;p&gt;Using Venue Maps in Bing Maps requires loading in the Venue Map module. If you are not familiar with modules in Bing Maps take a look at the blog post on &lt;a href="http://www.bing.com/community/Site_Blogs/b/maps/archive/2012/12/05/modules-in-bing-maps-windows-store-apps-javascript.aspx"&gt;Bing Maps Modules in Windows Store Apps&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In this blog post, we are going to create a simple application that when zoomed in, will load in nearby venues into Bing Maps in your Windows Store App as you pan the map around. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Setting up the project&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;To set up the project, open Visual Studios 2012 and create a new project. In the window that opens select &lt;b&gt;&lt;i&gt;JavaScript&lt;/i&gt;&lt;/b&gt; -&amp;gt; &lt;b&gt;&lt;i&gt;Windows Store&lt;/i&gt;&lt;/b&gt;. Select the &lt;b&gt;&lt;i&gt;Blank App&lt;/i&gt;&lt;/b&gt; template, and call the application &lt;b&gt;&lt;i&gt;VenueMaps_JS &lt;/i&gt;&lt;/b&gt;and press OK.&lt;/p&gt;  &lt;p&gt;To keep things clean we are going to create a separate JavaScript file for our application. Right click on the &lt;b&gt;&lt;i&gt;js&lt;/i&gt;&lt;/b&gt; folder and select &lt;b&gt;&lt;i&gt;Add&lt;/i&gt;&lt;/b&gt;&lt;i&gt; -&amp;gt; &lt;b&gt;New Item&lt;/b&gt;&lt;/i&gt;. Create a new JavaScript file called &lt;b&gt;&lt;i&gt;VenueMaps.js&lt;/i&gt;&lt;/b&gt;. &lt;/p&gt;  &lt;p&gt;At this point your Solution should look something like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/3566.clip_5F00_image001_5F00_558171D9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/5700.clip_5F00_image001_5F00_thumb_5F00_3B4108B5.png" width="332" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Next, add a reference to the Bing Maps JavaScript library. To do this, right click on the &lt;b&gt;&lt;i&gt;References&lt;/i&gt;&lt;/b&gt; folder and press &lt;b&gt;&lt;i&gt;Add Reference&lt;/i&gt;&lt;/b&gt;. Select &lt;b&gt;&lt;i&gt;Windows&lt;/i&gt;&lt;/b&gt; -&amp;gt; &lt;b&gt;&lt;i&gt;Extensions&lt;/i&gt;&lt;/b&gt; select &lt;b&gt;&lt;i&gt;Bing Maps for JavaScript&lt;/i&gt;.&lt;/b&gt; If you do not see this option ensure that you have installed the Bing Maps Windows Store App SDK.&lt;/p&gt;  &lt;p&gt;Now we can open up the &lt;b&gt;&lt;i&gt;default.html&lt;/i&gt;&lt;/b&gt; file and add references to the Bing Maps SDK along with references to the Bing Maps modules API and our JavaScript file. While we are at it, we will also add a div to the body of the page where we want the map control to load. Your &lt;b&gt;&lt;i&gt;default.html&lt;/i&gt;&lt;/b&gt; file should look like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;!&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;DOCTYPE&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;head&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;meta&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;charset&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;utf-8&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;title&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;title&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#006400"&gt;&amp;lt;!-- WinJS references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/css/ui-dark.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/js/base.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;//Microsoft.WinJS.1.0/js/ui.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#006400"&gt;&amp;lt;!-- VenueMaps_JS references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/css/default.css&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;rel&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/js/default.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#006400"&gt;&amp;lt;!-- Bing Maps references --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapicore.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ms-appx:///Bing.Maps.JavaScript//js/veapimodules.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#006400"&gt;&amp;lt;!-- Our Venue Maps JavaScript Code --&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;src&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/js/VenueMaps.js&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;type&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;=&amp;quot;text/css&amp;quot;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;color&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;#000&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;style&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;head&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;myMap&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9.5pt"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#800000"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9.5pt" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Loading the Bing Maps Control&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We will add the functionality to load the Bing Maps control to the &lt;b&gt;&lt;i&gt;VenueMap.js&lt;/i&gt;&lt;/b&gt; file. To start, we are going to create six global variables called: &lt;b&gt;&lt;i&gt;map&lt;/i&gt;&lt;/b&gt;, &lt;b&gt;&lt;i&gt;_mapBounds, _zoom, venueFactory, loadedVenues&lt;/i&gt;&lt;/b&gt;, and &lt;b&gt;&lt;i&gt;loadedVenueIds&lt;/i&gt;&lt;/b&gt;. Then, we will create a function called &lt;b&gt;&lt;i&gt;GetMap&lt;/i&gt;&lt;/b&gt; which will load the Bing Maps control for us. When loading the Bing Maps control we will also turn on the breadcrumb. The breadcrumb allows us to select different floors when viewing a venue. Inside of this function we will load in the Venue Maps module and initialize the &lt;b&gt;&lt;i&gt;venueFactory&lt;/i&gt;&lt;/b&gt; object. Now we will add a throttled event handler for when the map has finished moving that will get nearby venues. The &lt;b&gt;&lt;i&gt;GetMap&lt;/i&gt;&lt;/b&gt; function will be loaded after the &lt;b&gt;&lt;i&gt;Microsoft.Maps.Map&lt;/i&gt;&lt;/b&gt; module has completed loading. Your code should look like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; map,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;loadedVenues = [],&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;loadedVenueIds = [],&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;_mapBounds,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;_zoom,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venueFactory;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; GetMap() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; mapOptions =&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;credentials: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;YOUR_BING_MAPS_KEY&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;zoom: 2,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;showBreadcrumb : &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;};&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;map = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; Microsoft.Maps.Map(document.getElementById(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;myMap&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;), mapOptions);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Load the venue map module&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.loadModule(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;'Microsoft.Maps.VenueMaps'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;callback: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; () {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venueFactory = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; Microsoft.Maps.VenueMaps.VenueMapFactory(map);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Use a throttled event to reduce the number of unwanted events being fired.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.Events.addThrottledHandler(map, &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;'viewchangeend'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, GetNearbyVenues, 250);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Initialization logic for loading the map control&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; () {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; initialize() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.loadModule(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;'Microsoft.Maps.Map'&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;, { callback: GetMap });&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;document.addEventListener(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;&amp;quot;DOMContentLoaded&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;, initialize, &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;})();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Adding the Application Logic&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When the &lt;b&gt;&lt;i&gt;veiwchangeend&lt;/i&gt;&lt;/b&gt; event handler is fired, it will trigger a function called &lt;b&gt;&lt;i&gt;GetNearbyVenues&lt;/i&gt;&lt;/b&gt;. This function will first loop through all loaded venues and dispose those that are out of view or all of them if the zoom level is less than 14. When disposing a venue we will also delete the stored venue id in the &lt;b&gt;&lt;i&gt;loadedVenueIds&lt;/i&gt;&lt;/b&gt; array. If the zoom level is greater or equal to 14 we will do a search for all venues that are within 4000 meters of the center of the map. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; GetNearbyVenues() {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;_mapBounds = map.getBounds();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160; &lt;/span&gt;_zoom = map.getZoom();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Dispose a venue if it is outside of the map view or if the zoom&lt;span style="mso-spacerun: yes"&gt;&amp;#160; &lt;/span&gt;level is too high&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; venuesInView = [], venue;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;for&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; i = 0; i &amp;lt; loadedVenues.length; i++) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venue = loadedVenues[i];&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (_zoom &amp;lt; 14 || !_mapBounds.contains(venue.center)) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;delete&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; loadedVenueIds[venue.id];&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venue.dispose();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venuesInView.push(venue);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;loadedVenues = venuesInView;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (_zoom &amp;gt;= 14) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;// Search for venues that are within 4km of the center of the map&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venueFactory.getNearbyVenues({ map: map, location: map.getCenter(), radius: 4000, callback: DisplayNearbyVenues });&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When the search for nearby venues completes, a function called &lt;b&gt;&lt;i&gt;DisplayNearbyVenues&lt;/i&gt;&lt;/b&gt; will be fired. This function will loop through the venues that are returned and check if the venue has been loaded by checking the &lt;b&gt;&lt;i&gt;loadedVenueIds&lt;/i&gt;&lt;/b&gt; array. If the venue hasn’t been loaded we will create the venue and check to see if it is in the current map view and add both the venue and the venue id to the &lt;b&gt;&lt;i&gt;loadVenues&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;loadedVenueIds&lt;/i&gt;&lt;/b&gt; arrays. If it was loaded, we will then show it on the map. If it hasn't, we will dispose it. We will also attach a close event handler to the venue so that we can properly dispose it and remove any reference from our arrays. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table style="border-bottom: medium none; border-left: medium none; line-height: normal; list-style-type: disc; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;       &lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt" valign="top" width="638"&gt;         &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; DisplayNearbyVenues(venues) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (venues) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Load new venues that are in view&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;for&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; i = 0; i &amp;lt; venues.length; i++) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (loadedVenueIds[venues[i].metadata.MapId] == undefined) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venueFactory.create({&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;venueMapId: venues[i].metadata.MapId,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;success: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (v) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (_mapBounds.contains(v.center)) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Handle close event of venue&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;Microsoft.Maps.Events.addHandler(v, &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#a31515"&gt;'close'&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (e) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;delete&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; loadedVenueIds[v.id];&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#008000"&gt;//Remove venue from loadedVenues array&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;for&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; j = 0; j &amp;lt; loadedVenues.length; j++) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; (loadedVenues[j].id == v.id) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;loadedVenues.splice(j ,ji+1);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;break&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;v.dispose();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;loadedVenues.push(v);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;loadedVenueIds[v.id] = &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;v.show();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt; {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;v.dispose();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;});&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p style="line-height: normal; margin: 0in 0in 0pt" class="MsoNormal"&gt;&lt;span style="background-image: none; background-attachment: scroll; background-repeat: repeat; font-family: ; background-position: 0% 0%; color: ; mso-highlight: white; mso-font-kerning: 0pt"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Running the App&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At this point we have created all the functionality needed for nearby venues to be loaded as we navigate the map. If we run the app, zoom in and pan around in an area with the venue maps we should see the footprint of the venue load on the map. If you click on a venue footprint the map will zoom in on that venue and show the inside of the venue map. Here is a screen shot of the app with the venue map of Alder Hey Children’s Hospital located in Liverpool, UK.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/4024.Win8_5F00_Venue_5F00_132E5996.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Win8_Venue" border="0" alt="Win8_Venue" src="http://www.bing.com/community/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-54-35-metablogapi/0284.Win8_5F00_Venue_5F00_thumb_5F00_1758315B.jpg" width="554" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- Ricky Brundritt, EMEA Bing Maps Technology Solution Professional&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9691977&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Ricky Brundritt</name><uri>http://www.bing.com/blogs/members/Ricky-Brundritt/default.aspx</uri></author><category term="Windows 8" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Windows+8/default.aspx" /><category term="Ricky Brundritt" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Ricky+Brundritt/default.aspx" /><category term="Bing Maps for Windows Store Apps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/Bing+Maps+for+Windows+Store+Apps/default.aspx" /><category term="venue maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/venue+maps/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry><entry><title>Spatial Data Services: Job History &amp; Data Source Options</title><link rel="alternate" type="text/html" href="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/01/24/spatial-data-services-job-history-amp-data-source-options.aspx" /><id>http://www.bing.com/blogs/Site_Blogs/b/maps/archive/2013/01/24/spatial-data-services-job-history-amp-data-source-options.aspx</id><published>2013-01-24T17:36:00Z</published><updated>2013-01-24T17:36:00Z</updated><content type="html">&lt;p&gt;&lt;b&gt;New job history!&lt;/b&gt; Have you ever wanted to check status of your geocode and data source jobs and see what jobs you’ve run recently? &lt;b&gt;Bing Spatial Data Services now makes it easy to view your job history&lt;/b&gt;. With the new &lt;a href="http://msdn.corp.microsoft.com/en-us/library/jj905068.aspx"&gt;ListJobs API&lt;/a&gt; , you can return a list of all geocode jobs and jobs that made changes to data sources in the last 15 days for any Bing Maps Account. Pending jobs are listed first. All you need to do is provide a Bing Maps Key from your Bing Maps Account with the following URL. &lt;/p&gt;  &lt;p&gt;http://spatial.virtualearth.net/REST/v1/dataflows/listjobs?key=&lt;i&gt;Insert_Your_Bing_Maps_Key_Here&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;A JSON response is returned by default. Add “output(o)=xml” to return XML. Jobs that download data source data do not make changes to your data source and therefore are not part of this list.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;More __Distance query parameter options&lt;/b&gt;. Want to simply get all your entity data plus the distance to each entity?&lt;b&gt; Bing Spatial Data Services now accepts the wildcard character with the __Distance property&lt;/b&gt; &lt;b&gt;when you &lt;/b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg585133.aspx"&gt;&lt;b&gt;Query by Area&lt;/b&gt;&lt;/a&gt;&lt;b&gt;. &lt;/b&gt;Just specify $select=*,__Distance in your request. &lt;b&gt;The distance option has also been expanded to support bounding box (rectangular region) queries&lt;/b&gt;. For bounding box queries, the distance returned for each entity is the distance from the center of the bounding box.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Make your data source public! &lt;/b&gt;Want to share your data with the world? &lt;b&gt;Bing Spatial Data Services now gives you the option to make your data source public&lt;/b&gt; so that anyone with a Bing Maps Key can access. All you have to do is a &lt;a href="http://msdn.microsoft.com/en-us/library/jj735476.aspx"&gt;Make a Data Source Public&lt;/a&gt; request as shown below. Set the &lt;b&gt;&lt;i&gt;setpublic&lt;/i&gt;&lt;/b&gt; parameter to &lt;i&gt;true, and your data is publicly shared&lt;/i&gt;. &lt;/p&gt;  &lt;p&gt;http://spatial.virtualearth.net/REST/v1/data/accessID/dataSourceName/$updateDataSource?&lt;b&gt;setPublic=&lt;/b&gt;&lt;i&gt;trueOrFalse&lt;/i&gt;&amp;amp;key=&lt;i&gt; Insert_Your_Master_Key_Here&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;You can always make a data source private again by making the request again and setting the &lt;b&gt;&lt;i&gt;setpublic&lt;/i&gt;&lt;/b&gt; parameter to &lt;i&gt;false&lt;/i&gt;. This parameter is also available when you &lt;a href="http://msdn.microsoft.com/en-us/library/gg585130.aspx"&gt;Create or update your data source&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Delete selected entities with the new deleteEntity property. &lt;/b&gt;Want the ability to delete specific entities when you update your data source while leaving the rest of your data source intact? &lt;b&gt;Bing Spatial Data Services can now incrementally delete entities when you use the &lt;i&gt;__deleteEntity&lt;/i&gt; &lt;/b&gt;property in your schema and set it to &lt;i&gt;1&lt;/i&gt; or &lt;i&gt;true&lt;/i&gt; for each entity you want to remove when you &lt;a href="http://msdn.microsoft.com/en-us/library/gg585130.aspx"&gt;update your data source&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;We hope you enjoy these new features!&lt;/p&gt;  &lt;p&gt;-The Bing Maps Team&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.bing.com/blogs/aggbug.aspx?PostID=9692416&amp;AppID=5435&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Bing Maps Blog</name><uri>http://www.bing.com/blogs/members/Bing-Maps-Blog/default.aspx</uri></author><category term="spatial data services" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/spatial+data+services/default.aspx" /><category term="bing maps" scheme="http://www.bing.com/blogs/Site_Blogs/b/maps/archive/tags/bing+maps/default.aspx" /></entry></feed>