Unable to get value of the property 'shape': object is null or undefined RRS feed

  • Question

  • Hi,

    My code was working all fine till last Friday. I didnt change anything in the code since then. But now when I ran the code, I'm getting this error --

     "Microsoft JScript runtime error: Unable to get value of the property 'shape': object is null or undefined"

    Please help in fixing the error.

    Thank you!!


    var mapNeel = null, pinLayer, infobox;
    function GetMap() {
        mapNeel = new Microsoft.Maps.Map(document.getElementById("mapDiv"), { credentials: "my bing map" });
            //Create a layer for adding pushpins to
            pinLayer = new Microsoft.Maps.EntityCollection();
            //Add a layer for the infobox to be in which is above the pushpins
            var infoboxLayer = new Microsoft.Maps.EntityCollection();
            //Create a reusable infobox control
            infobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), { visible: false, offset: new Microsoft.Maps.Point(0, 20), height: 50 });
            // Add a handler for the map click event.
            Microsoft.Maps.Events.addHandler(mapNeel, 'rightclick', addPin);


    • Edited by bing25 Thursday, December 8, 2011 4:42 PM
    • Moved by Ricky_Brundritt Saturday, March 10, 2012 12:18 PM (From:Bing Maps: Map Control and Web services Development)
    Thursday, December 8, 2011 4:42 PM