提交 9ac4eb4a authored 作者: 张航's avatar 张航

2020/5/14 V1.0 正式可运行版本(包含了在线js)

上级 b3f5f0b7
# 下载地图的保存路径
file.basepath=/Users/echo/Desktop/em-map
#file.basepath=H:/em-map
#file.basepath=/Users/echo/Desktop/em-map
file.basepath=H:/em-map
# 项目的发布地址
file.mapImgPath=Users/echo/Desktop/em-map
#file.mapImgPath=H:/em-map
#file.mapImgPath=Users/echo/Desktop/em-map
file.mapImgPath=H:/em-map
# 下载地图的地址
#天地图服务器t0-t8间选一个
......
var localhostPath;
(function () {
// http://127.0.0.1:9090/cmjs/jsLib/emBase.js
var srcPath = document.currentScript.src; // 获取到当前script标签的src
var idx = srcPath.indexOf("/cmjs");
var contexPaht = srcPath.substring(0,idx);
localhostPath = contexPaht;
document.write('<meta name="viewport" content="width=device-width,initial-scale=1.0">');
document.write('<meta http-equiv="X-UA-Compatible" content="ie=edge">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/leafletJs/leaflet.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/lmcss/blinkmarker.css">');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/leafletJs/leaflet-src.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/setMapStytle.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/leaflet-tilelayer-colorizr.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/initMap.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/blinkmarker.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/DrawTool.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/GeoUtil.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/LineDistance.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/markerTrack.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/lm.geometryutil.js"></script>');
})();
\ No newline at end of file
// 点聚合样式
(function () {
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/lmcss/screen.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/lmcss/MarkerCluster.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/lmcss/MarkerCluster.Default.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"js/lmcss/screen.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"js/lmcss/MarkerCluster.css">');
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"js/lmcss/MarkerCluster.Default.css">');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/leaflet.markercluster-src.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/static/cmjs/lmJs/realworld.388.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/js/lmJs/leaflet.markercluster-src.js"></script>');
document.write('<script type="text/javascript" src='+localhostPath+'"/js/lmJs/realworld.388.js"></script>');
})();
\ No newline at end of file
......@@ -21,9 +21,9 @@ L.initMap = function(mapDiv,data){
attributionControl: false // 右下角leaflet.js图标
});
}
console.log(data.mapStyle)
if (data.mapStyle && data.mapStyle.indexOf("blue") != -1){
document.write('<link rel="stylesheet" type="text/css" href='+localhostPath+'"/static/cmjs/lmcss/blue.css">');
document.write('<link rel="stylesheet" type="text/css" href="'+localhostPath+'/js/lmcss/blue.css">');
}
//将图层加载到地图上,并设置最大的聚焦还有map样式
......@@ -36,7 +36,7 @@ L.initMap = function(mapDiv,data){
minZoom: 3,
colorize: function (pixel) {
// 科技紫主题
if (!data.mapStyte || data.mapStyte == 'default'){
if (!data.mapStyle || data.mapStyte == 'default'){
}
if (data.mapStyle == 'bluePurpled'){ // 蓝紫色主题
......
var localhostPath;
(function () {
// http://127.0.0.1:9090/cmjs/jsLib/emBase.js
var srcPath = document.currentScript.src; // 获取到当前script标签的src
var idx = srcPath.indexOf("/js/lmJs/lmBase.js");
var contexPaht = srcPath.substring(0,idx);
localhostPath = contexPaht;
document.write('<meta name="viewport" content="width=device-width,initial-scale=1.0">');
document.write('<meta http-equiv="X-UA-Compatible" content="ie=edge">');
document.write('<link rel="stylesheet" type="text/css" href="'+localhostPath+'/js/leafletJs/leaflet.css">');
document.write('<link rel="stylesheet" type="text/css" href="'+localhostPath+'/js/lmcss/blinkmarker.css">');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/leafletJs/leaflet-src.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/leaflet-tilelayer-colorizr.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/setMapStytle.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/initMap.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/blinkmarker.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/DrawTool.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/GeoUtil.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/LineDistance.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/markerTrack.js"></script>');
document.write('<script type="text/javascript" src="'+localhostPath+'/js/lmJs/lm.geometryutil.js"></script>');
})();
\ No newline at end of file
......@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>Leaflet Map</title>
<script type="text/javascript" src="/static/cmjs/lmJs/lmBase.js"></script>
<script type="text/javascript" src="/static/js/lmJs/lmBase.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="/cmjs/dist/leaflet.css">-->
<!-- &lt;!&ndash; 聚合样式 &ndash;&gt;-->
<!-- <link rel="stylesheet" href="/cmjs/css/screen.css"/>-->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论