{"id":945,"date":"2013-03-19T09:57:50","date_gmt":"2013-03-19T09:57:50","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=945"},"modified":"2013-03-19T09:57:50","modified_gmt":"2013-03-19T09:57:50","slug":"step-by-step-integrating-bing-maps-in-ms-crm-2011-part-2","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=945","title":{"rendered":"Step By Step integrating Bing Maps in MS CRM 2011 Part 2"},"content":{"rendered":"<p>In my earlier post <a title=\"Step By Step integrating Bing Maps in MS CRM\u00a02011\" href=\"http:\/\/mahenderpal.wordpress.com\/2011\/11\/08\/step-by-step-integrating-bing-maps-in-ms-crm-2011\/\">Step By Step integrating Bing Maps in MS CRM\u00a02011<\/a>, 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<\/p>\n<p><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8216;Microsoft&#8217; is undefined<\/strong><\/p>\n<p>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:<\/p>\n<p>function GetMap()<br \/>\n{<br \/>\ntry{<br \/>\n\/\/ Initialize the map<br \/>\nmap = new Microsoft.Maps.Map(document.getElementById(&#8220;mapDiv&#8221;),{credentials:&#8221;Your Bingmaps key&#8221;, mapTypeId:Microsoft.Maps.MapTypeId.road});<br \/>\nClickGeocode();<br \/>\n}<br \/>\ncatch(Ex)<br \/>\n{<br \/>\n<strong> \u00a0if(typeof(Microsoft)==&#8221;undefined&#8221;|| Ex.message==&#8221;&#8216;Microsoft&#8217; is undefined&#8221;)<\/strong><br \/>\n<strong>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0setTimeout(&#8216;GetMap()&#8217;,1000);<\/strong><br \/>\nelse<br \/>\nalert(Ex.Message);<br \/>\n}<br \/>\n}<\/p>\n<p>And I was able to see my result in Bingmaps<\/p>\n<p><a href=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/03\/redmond1.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-947 aligncenter\" alt=\"Redmond\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/03\/redmond1.gif\" width=\"302\" height=\"211\" \/><\/a><\/p>\n<p>you need to follow same steps that I have defined in my first post to make this function work.<\/p>\n<p>Enjoy!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my earlier post Step By Step integrating Bing Maps in MS CRM\u00a02011, 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 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8216;Microsoft&#8217; is undefined So I thought to try the same example again and when&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=945\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[27,35],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/945"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=945"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/945\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}