把google地圖放在Crm Entity中

解决了。
参考了几篇文章

http://www.qiuhao.com/dispbbs.asp?BoardID=26&ID=2725
还研究一下google地图搜索参数格式,把qiuhao上的那篇文章改了改,就行了。发觉还是google的比较好用。

1、先在客户实体中新建一个叫地图的标签,在里面建一个节,再在节里建一个IFRame,命名为IFRAME_LocationMAP;URL指向http://ditu.google.com/
    再在客户实体中新建一个叫公司网站的标签,在里面建一个节,再在节里建一个IFRame,命名为IFRAME_Website;URL地址随便写,但必须是一个网址的格式。

2、在常规标签中所有与地址相关的字段的onchange事件注入js代码为

var AccountURL = crmForm.all.websiteurl.DataValue;
if (AccountURL != null)
{
   crmForm.all.IFRAME_Website.src=AccountURL;
}
var mappath=" http://ditu.google.com/maps?f=q&hl=zh-CN&q=";
var cnty0=crmForm.all.address1_country.DataValue;
if (cnty0 != null)
{
     mappath=mappath+cnty0;
 }
var city0= crmForm.all.address1_stateorprovince.DataValue;
if (city0 != null)
{
    mappath=mappath+"+"+city0;
}
var city0= crmForm.all.address1_city.DataValue;
if (city0 != null)
{
    mappath=mappath+"+"+city0;
}

var strt0= crmForm.all.address1_line1.DataValue;
if (strt0 != null)
{
    mappath=mappath+"+"+strt0;
}
var city0= crmForm.all.address1_postalcode.DataValue;
if (city0 != null)
{
    mappath=mappath+"+"+city0;
}
crmForm.all.IFRAME_LocationMAP.src=mappath;

3、客户实体的onsave事件注入同上完全一样的js代码。

保存然后发布就OK了。

原文地址:https://www.cnblogs.com/janmson/p/1533895.html