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!!!

Advertisements

1 Comment

Filed under Uncategorized

One response to “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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s