How to create a link that could open Bing maps application on a windows phone ?


hi !

i have developped web site in asp.net / vb.net map in 1 of page. have used bing maps api ajax.

this works fine.

on map, have put 1 pushpin infobox location of , other pushpin location (the location of phone under windows phone 7.5).

i have gps coordinates of 2 pushpins.

my problem :

i put link called "itineraire" infobox of first pushpin opens bing maps application on windows phone user can way go location location. if not possible, @ least, link open bing maps application of windows phone, positionned on first location user click on button way position location.

how ???

<html>  <head>  <title>test bing maps</title>  <script charset="utf-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=fr-fr"></script>      <script type="text/javascript">          var map = null;          var mycredential = "xxxxxxxxxxxxxx";          var mapoptions = {              credentials: mycredential,              maptypeid: microsoft.maps.maptypeid.road,              center: new microsoft.maps.location(43.62807, 0.87578),              zoom: 10          }             function getmap() {                  // initialize map                  map = new microsoft.maps.map(document.getelementbyid("mapdiv"), mapoptions);                     ////////////////////////////////////////////////////////////////////////////                  // ad pin on map                  // retrieve location of map center                   var poscarte = map.getcenter();                  var posmypin = new microsoft.maps.location(43.62807, 0.87578);                     // add pin center of map                  var pinoptions = {                      //text: '.',                      icon: 'http://www.mywebsite/images/mypin.png',                      width: 40, //50                      height: 43, //57                      draggable: false                  }                  var pin = new microsoft.maps.pushpin(posmypin, pinoptions);                  map.entities.push(pin);                     ////////////////////////////////////////////////////////////////////////////                  //add infobox                  // create infobox pushpin                  pininfobox = new microsoft.maps.infobox(pin.getlocation(),                      {                          title: 'mon pushpin',                          description: 'exemple de texte dans mon infobox.',                          visible: false,                          offset: new microsoft.maps.point(0, 15)                      });                  microsoft.maps.events.addhandler(pin, 'click', displayinfobox);                  microsoft.maps.events.addhandler(map, 'viewchange', hideinfobox);                  map.entities.push(pininfobox);                             ////////////////////////////////////////////////////////////////////////////          }          function displayinfobox(e) {              pininfobox.setoptions({ visible: true });          }          function hideinfobox(e) {              pininfobox.setoptions({ visible: false });          }      </script>  </head>  <body onload="getmap();">         <form id="form1" name="form1" action="" method="get" enctype="application/x-www-form-urlencoded">          <input type="button" value="calculate route" onclick="clickroute()" />          </form>  </body>  </html>



Bing Maps  >  Bing Maps Web Controls



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'