欢迎访问爱油菜中文网!
您所在的位置:首页 > 代码学苑 > 网建教程

帝国CMS添加百度地图标注方法

作者:来源:帝国CMS发表于:2020-05-16 22:15:24

帝国cms任意模型加上百度地图标注功能。

00.jpg

00.jpg

 

 

第一步:首先在模型建立三个字段:
字段名:map_x 字段类型:DOUBLE
字段名:map_y 字段类型:DOUBLE
字段名:map_z 字段类型:TINYINT 最好设置个默认值13 14左右,是调整缩放级别的
系统模型该选的都选上,比如录入项、投稿项、可增加、可修改、内容模版。

第二步:修改系统模型表单模版

把这三个字段的代码删除改成:

 

 = = =标注地图 = = =点击地图标注

 然后在底部添加以下代码:

.belowdiv{display: none;position: absolute;top: 0%;left: 0%;width: 100% !important; width:100%;height: 100% !important; _height:1024px;background-color: gray;filter:alpha(opacity=20); opacity:0.2;z-index:1001;}.topdiv {display: none;position: absolute;top: 25%;left: 25%;width: 582px;height: 450px;padding: 16px;border-top:solid,16px,red;border-left:1px;border-right:1px;border-bottom:1px;background-color: white;z-index:1002;overflow: auto;} =function showOrHide(flag) {if(flag == 1) {document.getElementById("top").style.display = "block";document.getElementById("below").style.display = "block";}if(flag == 2) {document.getElementById("top").style.display = "none";document.getElementById("below").style.display = "none";}} = =当前坐标:[!--map_x--] 





相关文章
    无相关信息