Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

integrating Bing Maps in Ms dynamic crm

(0) ShareShare
ReportReport
Posted on by

I have  a problem in integrating bing map in html web resource of  ms dynamic crm,before it was working and now it is giving error VEMap is undefined error and I was using bing map api key of version 6 . Any help will be appreciated

*This post is locked for comments

  • H V Profile Picture
    H V 347 on at
    RE: integrating Bing Maps in Ms dynamic crm

    Hello,

    If you want to view or manage Custom Entity records on Bing Map, then you can use Microsoft Certified AppJetty's Quick Maps Plugin. It is also available on Microsoft AppSource. You can take a demo from https://www.appjetty.com/dynamicscrm-quick-maps.htm.

    pastedimage1578562004516v1.jpeg

    Remarkable Features

    • Heat Map
    • Route Optimization & Sharing
    • Territory Management
    • Reporting & Analytical Dashboards
    • Check in-Check out
    • User level Configuration
    • Search by region, shape and proximity
  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: integrating Bing Maps in Ms dynamic crm

    Rohan,

    I'm afraid you will have to learn how to troubleshoot your code in browser using developer tools and not in forum using real developers. This article - www.w3schools.com/.../js_debugging.asp can give you directions.

  • RE: integrating Bing Maps in Ms dynamic crm

    Hi Andrew Butenko,

    Thanks for your reply but when I am using above url code , it is giving me error

    JavaScript runtime error: Unable to get property 'clientWidth' of undefined or null reference

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: integrating Bing Maps in Ms dynamic crm

    Looks like this control is deprecated - ideas.dynamics.com/.../ID0001115 so it would not work anyway.

    I would suggest you to learn how to use new version of control. I left url in previous reply. Good luck learning something new.

  • RE: integrating Bing Maps in Ms dynamic crm

    Hi Andrew Butenko,

    This is my full html code

    <html><head><title></title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <script src="ecn.dev.virtualearth.net/.../mapcontrol.ashx;s=1" type="text/javascript"></script>

    <script src="ClientGlobalContext.js.aspx"></script>

    <script src="boggle_bingMapsJScript.js" type="text/javascript"></script>

    <script src="boggle_AdvancedFindSearch.js" type="text/javascript"></script>

    <script src="new_jquery" type="text/javascript"></script>

    <script src="new_jquery_datatables" type="text/javascript"></script>

    <script type="text/javascript" charset="utf-8">

       var oTable;

       var guids = new Array();

       function CreateML() {

           //alert(contactsArray);

           //if (window.opener != null && window.opener.contactsArray != null)

           //contactsArray = window.opener.contactsArray;

           //Open the map webresource

           //var mapWindow2 = window.open(serverUrl + "/WebResources/new_CreateML", "mapWindow2", "toolbar=0,menubar=0,directories=0,scrollbars=1,width=450,height=200,left=700,top=500");

           if (guids.length == 0) {

               alert("Please select at least one row!");

           }

           else {

               if (Xrm.Page.context.isOutlookClient()) {

                   openNewWindow(serverUrl + '/WebResources/boggle_CreateML', 'mapWindow2', 420, 120);

               }

               else {

                   PopupCenter(serverUrl + '/WebResources/boggle_CreateML', 'mapWindow2', 420, 120);

               }

           }

       }

       function PopupCenter(pageURL, title, w, h) {

           var left = (screen.width / 2) - (w / 2);

           var top = (screen.height / 2) - (h / 2);

           var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

           targetWin.opener = this;

       }

       function openNewWindow(pageURL, title, w, h) {

           var targetWin = openStdWin(pageURL, title, w, h, 'status=1');

           targetWin.opener = this;

       }

       /* Set properties for grid */

       $(document).ready(function () {

           oTable = $('#example2').dataTable({

               "bPaginate": true,

               "bLengthChange": true,

               "bFilter": false,

               "bSort": true,

               "bInfo": true,

               "bAutoWidth": true

           });

           //hide Guid column

           oTable.fnSetColumnVis(6, false);

       });

       $('#example2 tbody tr').live('click', function () {

           //clear array

           Array.clear(guids);

           $(this).toggleClass('row_selected');

           var anSelected = fnGetSelected(oTable);

           for (var i = 0; i < anSelected.length; i++) {

               //alert(oTable.fnGetData(anSelected[i],6));

               guids.push(oTable.fnGetData(anSelected[i], 6));

           }

           //alert(guids);

       });

       /* Get the rows which are currently selected */

       function fnGetSelected(oTableLocal) {

           return oTableLocal.$('tr.row_selected');

       }

       /* Select all rows */

       function SelectAll() {

           var nRows = oTable.fnGetNodes();

           if (guids.length == 0) {

               //alert('array is empty');

               for (var i = 0; i < oTable.fnGetData().length; i++) {

                   $(nRows[i]).addClass('row_selected');

                   //alert(oTable.fnGetData(nRows[i],6));

                   guids.push(oTable.fnGetData(nRows[i], 6));

               }

               //alert(guids);

           }

           else {

               //alert('array is not empty');

               //clear array

               Array.clear(guids);

               for (var i = 0; i < oTable.fnGetData().length; i++) {

                   $(nRows[i]).addClass('row_selected');

                   //alert(oTable.fnGetData(nRows[i],6));

                   guids.push(oTable.fnGetData(nRows[i], 6));

               }

               //alert(guids);

           }

       }

       /* Deselect all rows */

       function DeselectAll() {

           var nRows = oTable.fnGetNodes();

           for (var i = 0; i < oTable.fnGetData().length; i++) {

               $(nRows[i]).removeClass('row_selected');

           }

           //clear array

           Array.clear(guids);

       }

    </script>

    <script src="/_common/global.ashx?ver=-339091135" type="text/javascript">

    </script>

    <link href="/_common/styles/fonts.css.aspx" rel="stylesheet" type="text/css">

    <link href="/_common/styles/global.css.aspx" rel="stylesheet" type="text/css">

    <link href="/_common/styles/theme.css.aspx" rel="stylesheet" type="text/css">

    <link id="1340119669188" href="ecn.dev.virtualearth.net/.../mapcontrol.css&quot; rel="stylesheet" rev="stylesheet" type="text/css">

    <link href="new_demo_table" rel="stylesheet" type="text/css">

    </head>

    <body>

    <div id="myMap" style="width: 100%; height: 80%; position: relative;"></div>

    <div style="margin: 5px; width: 160px; text-align: center; float: right; cursor: pointer;" onclick="CreateML()" ;=""><img class="ms-crm-ImageStrip-AddToMarketingList_32" id="imgCreateML" alt="Add to Marketing List" src="/_imgs/ribbon/addtomarketinglist_32.png"> <br>Add to Marketing List </div>

    <div style="width: 100%;">

    <table>

    <tbody><tr>

    <td align="left"><button title="Select all" class="ms-crm-Button" id="btnSelectAll" style="width: 100px;" onmouseover="Mscrm.ButtonUtils.hoverOn(this)" onmouseout="Mscrm.ButtonUtils.hoverOff(this)" onclick="SelectAll()" ;="">Select all</button>

    </td>

    <td align="left"><button title="Deselect all" class="ms-crm-Button" id="btnDeselectAll" style="width: 100px;" onmouseover="Mscrm.ButtonUtils.hoverOn(this)" onmouseout="Mscrm.ButtonUtils.hoverOff(this)" onclick="DeselectAll()" ;="">Deselect all</button>

    </td>

    </tr>

    </tbody></table>

    </div>

    <table class="display" id="example2" border="0" cellspacing="0" cellpadding="0">

    <thead>

    <tr>

    <th>Full Name</th>

    <th>Street</th>

    <th>City</th>

    <th>Country</th>

    <th>Main Phone</th>

    <th>Primary E-mail</th>

    <th>Guid</th>

    </tr>

    </thead>

    <tfoot>

    <tr>

    <th>Full Name</th>

    <th>Street</th>

    <th>City</th>

    <th>Country</th>

    <th>Main Phone</th>

    <th>Primary E-mail</th>

    <th>Guid</th>

    </tr>

    </tfoot>

    </table>

    <div style="clear: both;"></div>

    </body></html>

  • Suggested answer
    sandeepc Profile Picture
    sandeepc 5,091 on at
  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: integrating Bing Maps in Ms dynamic crm

    Can you please provide full html? It doesn't look like you're using right approach. Right approach is described here - msdn.microsoft.com/.../mt712557.aspx

  • RE: integrating Bing Maps in Ms dynamic crm

    Hi Andrew Butenko,

    This is my code in javascript

       map = new VEMap('myMap');

       var mykey = "AoL4JYXVhiSdJyNxU7ShrRBJoAlLxv2A59X8IBNibV_jGTxvOnNpnnIq6dY_7Z4F";

       map.SetCredentials(mykey);

       map.LoadMap();

    myMap is div id  present in html webresource

    and this api url ,which i am using

    ecn.dev.virtualearth.net/.../mapcontrol.ashx;s=1

    error is VEMap is undefined

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: integrating Bing Maps in Ms dynamic crm

    Hello,

    Sharing of code you use can be helpful.

  • RE: integrating Bing Maps in Ms dynamic crm

    Hi Guillaume Domont,

    Thanks for your reply but I am asking to integrate the bing map in html web resource.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans