Step By Step integrating Bing Maps in MS CRM 2011 Part 2

In my earlier post Step By Step integrating Bing Maps in MS CRM 2011, I have explained how we can simply use Bing maps to show address information in MS CRM entity form, I got many comments in that post where user were facing below issue

                                                                            ‘Microsoft’ is undefined

So I thought to try the same example again and when first time I did not get this error, but when I tried again I also get above error, which is basically a loading issue, so I have modified the code little bit to recall that function again in case of this error:

function GetMap()
{
try{
// Initialize the map
map = new Microsoft.Maps.Map(document.getElementById(“mapDiv”),{credentials:”Your Bingmaps key”, mapTypeId:Microsoft.Maps.MapTypeId.road});
ClickGeocode();
}
catch(Ex)
{
 if(typeof(Microsoft)==”undefined”|| Ex.message==”‘Microsoft’ is undefined”)
                setTimeout(‘GetMap()’,1000);
else
alert(Ex.Message);
}
}

And I was able to see my result in Bingmaps

Redmond

you need to follow same steps that I have defined in my first post to make this function work.

Enjoy!!!

One thought on “Step By Step integrating Bing Maps in MS CRM 2011 Part 2

  1. Pingback: Blog Post from the Week (17th - 30th March 2013) - The South Asia MVP Blog - Site Home - TechNet Blogs

Leave a Reply

Your email address will not be published. Required fields are marked *