123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464 |
- // 本文件地址 http://10.110.35.104
- window.EASYMAP_CONFIG = {
- myUrl: 'http://10.110.35.104/',
- mapConfigName: '',
- poihost: '',
- }
- if (!window.SITE_CONFIG) {
- window.SITE_CONFIG = {}
- }
- if (window.SITE_CONFIG['mapLoadUrl']) {
- window.EASYMAP_CONFIG.myurl = window.SITE_CONFIG['mapLoadUrl']
- }
- if (window.SITE_CONFIG['isMapOnProduct'] === true) {
- window.EASYMAP_CONFIG.myUrl = './'
- }
- var mapConfig_4326 =
- {
- positionImgUrl:window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/position.png',
- //辖区坐标地址
- xq_url: "http://59.212.37.22/ime-cloud/rest/ADMI_DIVI_A/feature/0/query?where=datacode='{{datacode}}'",
- option: {
- crs: 'EPSG4326',
- center: { lon: 109.72898, lat: 19.183274 },
- zoom: 8,
- zoomControl: false,
- attributionControl: false,
- inertiaDeceleration: 15000,
- minZoom: 4, // 最小级别数
- maxZoom: 18, // 最大级别数
- },
- layers: [
- {
- name: '矢量',
- type: 'wmts',
- mapType: 'sl',
- url:'http://59.255.48.160:81/vec_c/wmts?tk=您的密钥',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/sl.png',
- option: {
- layer: "vec",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- opacity: 1,
- zIndex: 1,//海图永远在底图的上一层,
- },
- subLayer: [
- {
- name: '海南矢量',
- crs: 'CustomEPSG4326',
- type: 'GXYZ',
- url: 'http://59.212.37.22/mapserver/vmap/hn_bigdata_2018dt/getMAP?x={x}&y={y}&l={z}&styleId=hn_bigdata_2018dtys1',
- option: {
- tileSize: 256,
- minZoom: 8, // 最小级别数
- maxZoom: 18, // 最大级别数
- zIndex: 4,//海图永远在底图的上一层,
- opacity: 0.9,
- transparent: true,
- bounds:[[18.995361328125,109.3963623046875],[19.423828125, 110.3082275390625]]
- // bounds:[[18.1494140625, 108.5614013671875],[20.1708984375, 111.060791015625]]
- }
- },
- {
- name: '标记',
- url: 'http://59.255.48.160:81/cva_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cva",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- zIndex: 4//海图永远在底图的上一层
- }
- }
- ]
- },
-
- {
- name: '海图影像',
- type: 'wmts',
- mapType: 'htyx',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/yx.png',
- url: 'http://59.255.48.160:81/img_c/wmts?tk=您的密钥',
- option: {
- layer: "img",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- opacity: 0.6,
- zIndex: 1,//海图永远在底图的上一层,
- },
- subLayer: [
- {
- name: '影像',
- type: 'wmts',
- url: 'http://59.212.146.170:80/ime-cloud/rest/hainan_img_2018/wmts',
- option: {
- layer: "hainan_img_2018",
- style: "default",
- tilematrixSet: "default028mm",
- format: "image/jpgpng",
- minZoom: 8, // 最小级别数
- maxZoom: 18, // 最大级别数
- zIndex: 4,//海图永远在底图的上一层,
- bounds:[[13.257020557028,103.34794430865948],[23.46552385201528,114.30558768331025]]
- }
- },
- {
- name: '海图',
- url: 'http://59.212.37.22/service',
- type: 'wms',
- option: {
- layers: 'haitu',
- format: 'image/png',
- transparent: true,
- //crs: L.CRS.EPSG4326,
- opacity: 0.9,
- zIndex: 4//海图永远在底图的上一层
- }
- },{
- name: '标记',
- url: 'http://59.255.48.160:81/cia_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cia",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- zIndex: 4//海图永远在底图的上一层
- }
- }
- ]
- },
- {
- name: '海图矢量',
- type: 'wmts',
- mapType: 'htsl',
- url:'http://59.255.48.160:81/vec_c/wmts?tk=您的密钥',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/sl.png',
- option: {
- layer: "vec",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- opacity: 1,
- zIndex: 1,//海图永远在底图的上一层,
- },
- subLayer: [
- {
- name: '海南矢量',
- crs: 'CustomEPSG4326',
- type: 'GXYZ',
- url: 'http://59.212.37.22/mapserver/vmap/hn_bigdata_2018dt/getMAP?x={x}&y={y}&l={z}&styleId=hn_bigdata_2018dtys1',
- option: {
- tileSize: 256,
- minZoom: 8, // 最小级别数
- maxZoom: 18, // 最大级别数
- zIndex: 4,//海图永远在底图的上一层,
- opacity: 0.9,
- transparent: true,
- bounds:[[18.995361328125,109.3963623046875],[19.423828125, 110.3082275390625]]
- // bounds:[[18.1494140625, 108.5614013671875],[20.1708984375, 111.060791015625]]
- }
- },
- {
- name: '海图',
- url: 'http://59.212.37.22/service',
- type: 'wms',
- option: {
- layers: 'haitu',
- format: 'image/png',
- transparent: true,
- //crs: L.CRS.EPSG4326,
- opacity: 0.6,
- zIndex: 4,//海图永远在底图的上一层,
- // bounds:[[18.1494140625, 108.5614013671875],[20.1708984375, 111.060791015625]]
- }
- },
- {
- name: '标记',
- url: 'http://59.255.48.160:81/cva_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cva",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- zIndex: 4//海图永远在底图的上一层
- }
- }
- ]
- },
- {
- name: '影像',
- type: 'wmts',
- mapType: 'yx',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/yx.png',
- url: 'http://59.255.48.160:81/img_c/wmts?tk=您的密钥',
- option: {
- layer: "img",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- opacity: 0.6,
- zIndex: 1,//海图永远在底图的上一层,
- },
- subLayer: [
- {
- name: '影像',
- type: 'wmts',
- url: 'http://59.212.146.170:80/ime-cloud/rest/hainan_img_2018/wmts',
- option: {
- layer: "hainan_img_2018",
- style: "default",
- tilematrixSet: "default028mm",
- format: "image/jpgpng",
- minZoom: 8, // 最小级别数
- maxZoom: 18, // 最大级别数
- zIndex: 4,//海图永远在底图的上一层,
- bounds:[[13.257020557028,103.34794430865948],[23.46552385201528,114.30558768331025]]
- }
- },{
- name: '标记',
- url: 'http://59.255.48.160:81/cia_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cia",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- zIndex: 4//海图永远在底图的上一层
- }
- }
- ]
- },
- {
- name: '地形图',
- type: 'wmts',
- mapType: 'dxt',
- url: 'http://59.255.48.160:81/ter_c/wmts?tk=您的密钥',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/dx.png',
- option: {
- layer: "ter",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- },
- subLayer: [
- {
- name: '海南地形图',
- url: 'http://59.212.146.170/ime-cloud/rest/hainan_dem/wmts',
- type: 'wmts',
- option: {
- layer: "hainan_dem",
- style: "default",
- tilematrixSet: "default028mm",
- format: "image/jpgpng",
- minZoom: 8, // 最小级别数
- maxZoom: 18, // 最大级别数
- zIndex: 4,//海图永远在底图的上一层,
- bounds:[[17.17616389817063,106.9017014531631],[21.04474386095089,113.04819115525501]]
- }
- },
- {
- name: '标记',
- url: 'http://59.255.48.160:81/cta_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cta",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- }
- }
- /* {
- name: '标记',
- url: 'http://59.212.146.170:80/ime-cloud/rest/hainan_img_zj/wmts',
- type: 'wmts',
- option: {
- layer: "hainan_img_zj",
- style: "default",
- tilematrixSet: "default028mm",
- format: "image/jpgpng",
- bounds:[[16.836052000000052,107.79557194900008],[20.450422649000075,112.34245500000009]]
- }
- }*/
- ]
- }
- ,{
- name: '黑元素',
- crs: 'CustomEPSG4326',
- type: 'GXYZ',
- mapType: 'hys',
- url: 'http://59.212.37.22/mapserver/vmap/hn_bigdata_2018dt/getMAP?x={x}&y={y}&l={z}&styleId=hn_bigdata_2018dtys2',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/hys.png',
- option: {
- tileSize: 512
- },
- subLayer: [
- {
- name: '标记',
- url: 'http://59.255.48.160:81/cta_c/wmts?tk=您的密钥',
- type: 'wmts',
- option: {
- layer: "cta",
- style: "default",
- tilematrixSet: "c",
- format: "tiles",
- }
- }
- ]
- },
- ],
- overlayMaps: [
- /*{
- name:'标记',
- url:'http://59.212.146.170:80/ime-cloud/rest/hainan_img_zj/wmts',
- type:'wmts',
- option:{
- layer: "hainan_img_zj",
- style: "default",
- tilematrixSet: "default028mm",
- format: "image/jpgpng",
- bounds:[[16.836052000000052,107.79557194900008],[20.450422649000075,112.34245500000009]]
- }
- },*/
- /*{
- name: 'bj',
- crs: 'CustomEPSG4326',
- type: 'GWVTAnno',
- url: 'http://59.212.37.22/mapserver/label/hn_bigdata_2018dt/getData?x={x}&y={y}&l={z}&styleId=hn_bigdata_2018dtys1',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/hys.png',
- option: {
- tileSize: 512
- }
- },
- {
- name: 'ht',
- url: 'http://59.212.37.22/service',
- type: 'wms',
- option: {
- layers: 'haitu',
- format: 'image/png',
- transparent: true,
- //crs: L.CRS.EPSG4326,
- opacity: 0.6,
- zIndex: 2//海图永远在底图的上一层
- }
- }*/
- ]
- };
- //互联网,高德地图配置
- var mapConfig_3857 =
- {
- //辖区坐标地址
- xq_url: "http://59.212.37.22/ime-cloud/rest/ADMI_DIVI_A/feature/0/query?where=datacode='{{datacode}}'",
- option: {
- crs: 'EPSG3857',
- center: { lon: 109.72898, lat: 19.183274 },
- zoom: 8,
- zoomControl: false,
- attributionControl: false,
- inertiaDeceleration: 15000,
- },
- layers: [
- {
- name: '矢量',
- crs: 'EPSG3857',
- type: 'gd',
- url: 'http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/sl.png',
- option: {
- subdomains: ['1', '2', '3', '4'],
- // attribution: "地图"
- minZoom: 3, // 最小级别数
- maxZoom: 18, // 最大级别数
- // tileSize:512, //切片尺寸(宽度和高度的像素值,假设切片是正方形的)
- // opacity:0.4, //切片图层的透明度
- // tms:true, //如果此值为true,反转切片Y轴的编号(对于TMS服务需将此项打开)
- // attribution: '12', // 用来进行属性控制的字符串,描述了图层数据。
- reuseTiles: true
- }
- },
- {
- name: '影像',
- crs: 'EPSG3857',
- type: 'gd',
- url: 'http://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
- imgUrl: window.EASYMAP_CONFIG.myUrl + 'map-easy-client/images/map/yx.png',
- option: {
- subdomains: ['1', '2', '3', '4'],
- // attribution: "地图"
- minZoom: 3, // 最小级别数
- maxZoom: 18, // 最大级别数
- // tileSize:512, //切片尺寸(宽度和高度的像素值,假设切片是正方形的)
- // opacity:0.4, //切片图层的透明度
- // tms:true, //如果此值为true,反转切片Y轴的编号(对于TMS服务需将此项打开)
- // attribution: '12', // 用来进行属性控制的字符串,描述了图层数据。
- reuseTiles: true
- },
- subLayer: [
- {
- name: '标记',
- url: 'http://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}',
- type: 'gd',
- option: {
- subdomains: ['1', '2', '3', '4'],
- // attribution: "地图"
- minZoom: 3, // 最小级别数
- maxZoom: 18, // 最大级别数
- // tileSize:512, //切片尺寸(宽度和高度的像素值,假设切片是正方形的)
- // opacity:0.4, //切片图层的透明度
- // tms:true, //如果此值为true,反转切片Y轴的编号(对于TMS服务需将此项打开)
- // attribution: '12', // 用来进行属性控制的字符串,描述了图层数据。
- reuseTiles: true
- }
- }
- ]
- },
- ],
- overlayMaps: []
- };
- // 请引入JQ
- //window.EASYMAP_CONFIG['mapConfigName'] = window.SITE_CONFIG['mapConfigName'] || 'mapConfig_3857'; // 高德地图
- window.EASYMAP_CONFIG['mapConfigName'] = window.SITE_CONFIG['mapConfigName'] || 'mapConfig_4326'; // 测绘局地图
- //window.EASYMAP_CONFIG['poihost'] = window.SITE_CONFIG['poihost'] || 'http://124.225.17.80:8120/sgyztapi'; // 互联网接口地址
- window.EASYMAP_CONFIG['poihost'] = window.SITE_CONFIG['poihost'] || 'http://10.110.35.104:80'; // 政务外网接口地址
- // 如需使用其他接口地址,请自行配置
- (function (window, document, undefined) {
- document.write('<link rel="stylesheet" href="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet.css" />');
- document.write('<link rel="stylesheet" href="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet-geoman.css" />');
- document.write('<link rel="stylesheet" href="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet-easy.css" />');
-
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/map-easy-client.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/poi.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/FormatTime.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet-src.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/tileLayer.wmts.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/CustomWebSDK.min.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/hnCityTree.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet-omnivore.min.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/leaflet-geoman.min.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/tileLayer.wmts.poi.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/tileLayer.wmts.realtime.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/titleLayer.wmts.realtime.zt.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/layer.yj.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/MovingMarker.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/MovingMarker.zt.js"></script>');
- document.write('<script src="' + window.EASYMAP_CONFIG.myUrl + 'map-easy-client/realtime.js"></script>');
- }(window, document));
|