locked
Integrating Map to Contact entity RRS feed

  • Question

  • Hi,

    I want to add google map to contact entity. I have followed the steps mentioned in below link.

    http://a33ik.blogspot.com/2010/06/intergration-google-maps-v3-into.html

    but Map is not getting loaded.

    While creating IFrame in a tab what URL should i mention???

    Also is the map will load only when the address fields are given???

     

    Friday, July 2, 2010 6:59 AM

Answers

  • You should use about:blank as a default url for iframe.

     

    Try to use following code to get the calling url and place the result here:

    crmForm.all.tab4Tab.onclick = function()
    {
     var url = "";
     if (crmForm.all.address1_country.DataValue != null)
      url = crmForm.all.address1_country.DataValue;
     if (crmForm.all.address1_city.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_city.DataValue;
     if (crmForm.all.address1_name.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_name.DataValue;
     if (crmForm.all.address1_line1.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line1.DataValue;
     if (crmForm.all.address1_line2.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line2.DataValue;
     if (crmForm.all.address1_line3.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line3.DataValue;
     if (url != "")
     {
    alert(url);
      url = "/ISV/gmap/mapintegration.html?address=" + url;
      crmForm.all.IFRAME_map.src = url;
     }
    }

     

    Once you've clicked on the tab with map - you will get the message with used url. This will allow me to help you to solve your issue.

     

    If you would not give me this info - I would not be able to help you. I've done everything I could to help you.


    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Friday, July 2, 2010 1:27 PM
    Moderator

All replies

  • Please any one help me.

    Google map is not getting loaded in the iframe??

    Am i missing any thing....

    Friday, July 2, 2010 7:40 AM
  • a33ik.blogspot.com is my blog. And believe me - this customization works fine. Could you paste here scripts and screenshots of form you wnat to integrate google map in.

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Friday, July 2, 2010 7:44 AM
    Moderator
  • Hi,

    this is the code i used.

    crmForm.all.tab4Tab.onclick = function()
    {
     var url = "";
     if (crmForm.all.address1_country.DataValue != null)
      url = crmForm.all.address1_country.DataValue;
     if (crmForm.all.address1_city.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_city.DataValue;
     if (crmForm.all.address1_name.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_name.DataValue;
     if (crmForm.all.address1_line1.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line1.DataValue;
     if (crmForm.all.address1_line2.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line2.DataValue;
     if (crmForm.all.address1_line3.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line3.DataValue;
     if (url != "")
     {
    alert(url)
      url = "/ISV/gmap/mapintegration.html?address=" + url;
      crmForm.all.IFRAME_map.src = url;
     }
    }

    Also i have created the html file in located in the Isv folder in inetpub folder.

    created IFrame too...

    What url address should i specify while creating the iframe??

    Do i want to add any other thing????

    Friday, July 2, 2010 8:00 AM
  • Hi,

    When i open the HTML file that i have created manually it's showing as Geocode was not successful for the following reason: ZERO_RESULTS

    Also when i open manually it's not opening in Internet Explorer. Opening only in FireFox that too with the above error

    Do i want to add any other thing other than these things???

    Friday, July 2, 2010 8:52 AM
  • Basic url for iframe must be about:blank

    On what tab is map placed?


    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Friday, July 2, 2010 11:43 AM
    Moderator
  • Hi,

    In the seperate tab called Map.

    Also i created the html file using the code which you provided in your blog. When i open that html file manually it's showing as

    Geocode was not successful for the following reason: INVALID_REQUEST.

    Why this occurs??

    Friday, July 2, 2010 12:31 PM
  • Hi,

    I have used the below url directly.

    http://maps.google.com/

    Now it's loading but the map alone not loading.

    if i click the other links like orkut, images, videos etc.. it's going fine..

    The problem is map alone not getting loaded??

    What is the issue??

    Friday, July 2, 2010 1:22 PM
  • You should use about:blank as a default url for iframe.

     

    Try to use following code to get the calling url and place the result here:

    crmForm.all.tab4Tab.onclick = function()
    {
     var url = "";
     if (crmForm.all.address1_country.DataValue != null)
      url = crmForm.all.address1_country.DataValue;
     if (crmForm.all.address1_city.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_city.DataValue;
     if (crmForm.all.address1_name.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_name.DataValue;
     if (crmForm.all.address1_line1.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line1.DataValue;
     if (crmForm.all.address1_line2.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line2.DataValue;
     if (crmForm.all.address1_line3.DataValue != null)
      url += (url == "" ? "" : ", ") + crmForm.all.address1_line3.DataValue;
     if (url != "")
     {
    alert(url);
      url = "/ISV/gmap/mapintegration.html?address=" + url;
      crmForm.all.IFRAME_map.src = url;
     }
    }

     

    Once you've clicked on the tab with map - you will get the message with used url. This will allow me to help you to solve your issue.

     

    If you would not give me this info - I would not be able to help you. I've done everything I could to help you.


    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Friday, July 2, 2010 1:27 PM
    Moderator
  • Hi,

    i am getting the message as the fields values which i am entering in city, country, address fields.

    this what i am retrieving as message...

    if i use that alert command after one line that is like this.


      url = "/ISV/gmap/mapintegration.html?address=" + url;

    alert(url);
      crmForm.all.IFRAME_map.src = url;

    if i use the alert message as above i am getting as

    /ISV/gmap/mapintegration.html?address= India , Chennai , Ambattur, Ambattur Estate.

    these are the values which i am entering in the fields..

    this what i am getting as message

     

     

    Friday, July 2, 2010 1:39 PM
  • Hi,

    I have provided the details which you have asked..

    Please help me???

    What else details you want to me to help?? Let me know i will provide you.

    Saturday, July 3, 2010 9:24 AM
  • Hi,

    i am getting the message as the fields values which i am entering in city, country, address fields.

    this what i am retrieving as message...

    if i use that alert command after one line that is like this.


      url = "/ISV/gmap/mapintegration.html?address=" + url;

    alert(url);
      crmForm.all.IFRAME_map.src = url;

    if i use the alert message as above i am getting as

    /ISV/gmap/mapintegration.html?address= India , Chennai , Ambattur, Ambattur Estate.

    these are the values which i am entering in the fields..

    this what i am getting as message

     

     


    I don't know how you've used my codes but for it worked. Check following screenshots:

    http://lh5.ggpht.com/_73OmG38HHME/TDYNrNdqmjI/AAAAAAAAApE/yfnYLSszb1c/MapIntegrationTest1.JPG

    http://lh4.ggpht.com/_73OmG38HHME/TDYNrUEUWPI/AAAAAAAAApI/2j5US32MTiA/MapIntegrationTest2.JPG


    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Thursday, July 8, 2010 5:48 PM
    Moderator