开始
引入
<script src="./js/minemap/turf.min.js"></script>
<link rel="stylesheet" href="./js/minemap/minemap.css">
<script src="./js/minemap/minemap.js"></script>
<script src="./js/minemap/template.js"></script>
<script src="./js/minemap/minemap-edit.js"></script>
配置
配置文件位置
/home/qsdi/projects/html/json
nginx配置
location /json/ {
alias /home/qsdi/projects/html/json/;
}
{
"mapOpts": {
"minZoom": 3,
"defaultZoom": 16,
"maxZoom": 17,
"centerPoint": [
118.74672934041587,31.97278927843742
],
"pitch": 0,
"restrictedExtent": [
5513366.366431,
5513366.366431,
396293.14491343,
1.7914393445139E7,
8282148.4790384
],
"logoControl": false,
"projection": "LATLON"
},
"globConfig": {
"domainUrl" : "//83.206.1.77:21009",
"dataDomainUrl" : "//83.206.1.77:21009",
"serverDomainUrl" : "//83.206.1.77:21009",
"spriteUrl" : "//83.206.1.77:21009/minemapapi/v2.0.0/sprite/sprite",
"serviceUrl" : "//83.206.1.77:21009/service/",
"appKey" : "25cc55a69ea7422182d00d6b7c0ffa93",
"solution" : "12612"
},
"vectorLayer": {
"style": "//83.206.1.77:21009/service/solu/style/id/12612",
"appKey": "ca78282dfff148e3be5390ce027068f5",
"solution": "12612"
},
"imageLayer": {
"sourceId": "IMAGERY_SOURCE",
"source": {
"type": "raster",
"tiles": [
"http://83.206.1.79:9082/qxn-bigMapData/network/cennaviMap?tilematrix={z}&tilerow={y}&tilecol={x}"
],
"tileSize": 256
},
"layerId": "IMAGERY",
"style": "//83.206.1.77:21009/service/solu/style/id/12621",
"appKey": "ca78282dfff148e3be5390ce027068f5",
"solution": "12621"
},
"sattilateLayer": []
}