none
Bing map is displayed with the invalid credentials message

    Question

  • I have created the Bing Map account and generated the map key. However on the website the map is displayed with the invalid credentials message. The account details are below.

    Key: AhX9XTl3fvYYhJIhf4MdkSsG40e8zgWccmDyy1fhnSZvpSEUcJgDfPJ3bI3aqKJY

    What is the correct URL to connect to the bing maps using the developer's account?

    Thursday, September 19, 2013 7:08 AM

Answers

  • Hi there,

    I've looked into the key. It works fine with the Bing Maps SDK. There is no separate developer version of Bing Maps. Everyone has access to the same version. Here is a simple test app I used to test your key:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
       <head>
          <title></title>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
          <script type="text/javascript" src=http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-US></script>
    
          <script type="text/javascript">
          function GetMap()
          {  
             var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), 
                               {credentials: "AhX9XTl3fvYYhJIhf4MdkSsG40e8zgWccmDyy1fhnSZvpSEUcJgDfPJ3bI3aqKJY"});
          }
          </script>
       </head>
       <body onload="GetMap();">
          <div id='mapDiv' style="; width:600px; height:400px;"></div>       
       </body>
    </html>

    One thing I noticed is that this is a trial key. Trial keys expire after 90 days. So if after 90 days you find the key doesn't work anymore this is why.

    http://rbrundritt.wordpress.com


    Thursday, September 19, 2013 9:37 AM
  • The mkt parameter isn't needed unless you what to support languages other than US English. I have it by default in my basic code sample I keep for things like this.

    http://rbrundritt.wordpress.com

    Thursday, September 19, 2013 7:08 PM

All replies

  • Hi there,

    I've looked into the key. It works fine with the Bing Maps SDK. There is no separate developer version of Bing Maps. Everyone has access to the same version. Here is a simple test app I used to test your key:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
       <head>
          <title></title>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
          <script type="text/javascript" src=http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-US></script>
    
          <script type="text/javascript">
          function GetMap()
          {  
             var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), 
                               {credentials: "AhX9XTl3fvYYhJIhf4MdkSsG40e8zgWccmDyy1fhnSZvpSEUcJgDfPJ3bI3aqKJY"});
          }
          </script>
       </head>
       <body onload="GetMap();">
          <div id='mapDiv' style="; width:600px; height:400px;"></div>       
       </body>
    </html>

    One thing I noticed is that this is a trial key. Trial keys expire after 90 days. So if after 90 days you find the key doesn't work anymore this is why.

    http://rbrundritt.wordpress.com


    Thursday, September 19, 2013 9:37 AM
  • Hi Ricky,

    Thank you for the reply. In the URL is the param mkt=en-US required. Will the map not work without this param.

    Regards,
    Srinath

    Thursday, September 19, 2013 12:19 PM
  • The mkt parameter isn't needed unless you what to support languages other than US English. I have it by default in my basic code sample I keep for things like this.

    http://rbrundritt.wordpress.com

    Thursday, September 19, 2013 7:08 PM