初遇Citymaker (一)
今天来分享下 基于citymaker 构建快速的封装的gis库的故事
针对citymaker 常用的判断textInfo
-
let textInfo = {
-
GENERAL:{
-
GET_IT:'我知道了',
-
DOWNLOAD:'前往下载'
-
},
-
MAC:{
-
INFO:'您的系统是 Mac OSX 系统,只支持二维地图功能,如要使用三维地图,请更换 Windows 系统',
-
},
-
BROWSER:{
-
SOUGOU:{
-
INFO:'浏览器不支持citymaker,请更换IE11或搜狗浏览器'
-
}
-
},
-
RUNTIME:{
-
INFO:'您没有 CityWorks runtime'
-
}
-
};
-
-
export {textInfo};
针对帮助creatMessageBox, 如果没装citymaker插件``javascript export function creatMessageBox(content, confirmText, callback) { confirmText = confirmText || '确定'; var contentText = content || '不支持三维'; var nodeWrap = document.createElement('div'); nodeWrap.setAttribute('class', 'cityworks_message_box_ct'); nodeWrap.innerHTML =
; document.body.appendChild(nodeWrap); var headNode = document.getElementsByTagName('head')[0]; var styleNode = document.createElement('style'); headNode.appendChild(styleNode); styleNode.setAttribute('class', 'cityworks_message_box_ct_style'); styleNode.innerHTML =
.cityworks_message_box_ct {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
background: rgba(0, 0, 0, .68);
z-index: 9999;
}
-
.cityworks_message_box_ct:after {
-
content: "";
-
display: inline-block;
-
height: 100%;
-
width: 0;
-
vertical-align: middle;
-
}
-
-
.message_box {
-
display: inline-block;
-
width: 436px;
-
height: 204px;
-
background: #000;
-
background-color: #fff;
-
opacity: 1;
-
}
-
-
.message_box_head {
-
height: 48px;
-
background: rgba(0, 177, 255, 1);
-
display: flex;
-
align-items: center;
-
justify-content: space-between;
-
padding-left: 14px;
-
padding-right: 19px;
-
}
-
-
.message_box_head_text {
-
font-size: 12px;
-
font-family: MicrosoftYaHei;
-
color: rgba(255, 255, 255, 1);
-
font-weight: normal;
-
}
-
-
.message_box_head_svg {
-
width: 15px;
-
height: 15px;
-
cursor: pointer;
-
}
-
-
.message_box_content {
-
display: flex;
-
align-items: center;
-
justify-content: center;
-
height: 92px;
-
border-bottom: 1px solid #E8E8E8;
-
padding: 0 15px;
-
}
-
-
.message_box_content_svg {
-
-
}
-
-
.message_box_content_text {
-
font-size: 12px;
-
font-family: MicrosoftYaHei;
-
color: rgba(95, 132, 159, 1);
-
margin-left: 7px;
-
text-align: left;
-
}
-
-
.message_box_footer {
-
height: 64px;
-
display: flex;
-
align-items: center;
-
justify-content: flex-end;
-
padding-right: 21px;
-
}
-
-
.message_box_footer_button {
-
width: 76px;
-
height: 28px;
-
font-size: 12px;
-
font-family: MicrosoftYaHei;
-
border-radius: 2px;
-
text-align: center;
-
outline: none;
更多参考 https://xiaozhuanlan.com/topic/6753890142
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律