Bing V8 - Getting Error while loading page RRS feed

  • Question

  • Hi,

    We are getting Javascript error while loading V8 version of the mapcontrol. From the console we could get the error as "Unable to get property 'prototype' of undefined or null reference".

    As per the suggestion in the blog we tried the async defer with Callback but now we are getting the error.

    Uncaught ReferenceError: Microsoft is not defined at GetMap 

    <script type="text/javascript" src="" async defer></script>

     <script type="text/javascript">
            var map;


    function GetMap() {

                map = new Microsoft.Maps.Map(document.getElementById('<%=Map.ClientID%>'), {
                    credentials: BingKey

    Is it a known error or am I missing something?

    Friday, March 17, 2017 8:25 AM


  • Not able to reproduce this issue. Only thing I can think of is that the map control is cached and is trying to call the GetMap function before the page has loaded it. Try moving the map script URL lower in your page after the script tag you are loading the map in and possibly at the bottom of the body of the page and see if that makes a difference or not.

    [Blog] [twitter] [LinkedIn]

    Friday, March 17, 2017 2:54 PM