none
Bing map not work from IE RRS feed

  • Question

  • I have a html page which shows a map using Bing map v8. The page was deployed to IIS server.

    There is no problem when it was accessed from both Firefox and chrome, but not from IE, version 11.

    When the html file was opened directly from local hard driver, the map show up, but when open the html file from network driver the map didn't show up.

    Thanks for help,

    This is my code:

    <!DOCTYPE html>
    <html>
      <head>
       <title>Bing Maps V8 Test</title>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <script  type='text/javascript' src='http://www.bing.com/api/maps/mapcontrol'></script> 
       <script type="text/javascript">
           var map = null;

           function GetMap() {
               map = new Microsoft.Maps.Map("#myMap", {
                   credentials: 'My Credentials',
                   center: new Microsoft.Maps.Location(42.251934, -71.771988),
                   zoom: 7
               });
           }
       </script>
      </head>
      <body onload="GetMap();">
       <div id='myMap' style="; top:0px; width:100%; height:100%;"></div>
      </body>
    </html>

     
    Tuesday, October 18, 2016 3:21 PM

Answers

  • Just tried your code as-is in IE 11 and it worked fine (I added back in a position value as the forums seems to remove that). Make sure your browser isn't in compatibility mode. If it is, the browser will render the page using IE5 standards which won't work. You can either use the browser options to check/disable this: https://support.microsoft.com/en-us/kb/2536204 or you can add the following tag to your head of your page: <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

    [Blog] [twitter] [LinkedIn]

    Tuesday, October 18, 2016 3:31 PM

All replies

  • Just tried your code as-is in IE 11 and it worked fine (I added back in a position value as the forums seems to remove that). Make sure your browser isn't in compatibility mode. If it is, the browser will render the page using IE5 standards which won't work. You can either use the browser options to check/disable this: https://support.microsoft.com/en-us/kb/2536204 or you can add the following tag to your head of your page: <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

    [Blog] [twitter] [LinkedIn]

    Tuesday, October 18, 2016 3:31 PM
  • Thank you very much! It worked after I added the tag to my page. 
    Tuesday, October 18, 2016 3:51 PM