|
@@ -239,34 +239,56 @@ export default {
|
|
map = new Map({
|
|
map = new Map({
|
|
target: 'mapview',
|
|
target: 'mapview',
|
|
layers: [
|
|
layers: [
|
|
- // 天地图 地图
|
|
|
|
|
|
+ // QQ Map
|
|
|
|
+ /* eslint-disable */
|
|
new TileLayer({
|
|
new TileLayer({
|
|
- class: 'basemap',
|
|
|
|
- title: 'tiandi',
|
|
|
|
- source: new XYZ({
|
|
|
|
- url: 'https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
|
|
|
|
- }),
|
|
|
|
- visible: true
|
|
|
|
- // nameCN: '在线地图'
|
|
|
|
|
|
+ source: new XYZ({
|
|
|
|
+ class: 'basemap',
|
|
|
|
+ title: 'tiandi',
|
|
|
|
+ tileUrlFunction: function(xyz){
|
|
|
|
+ if (!xyz) {
|
|
|
|
+ return ''
|
|
|
|
+ }
|
|
|
|
+ console.log("xyz:", xyz)
|
|
|
|
+ var z = xyz[0]
|
|
|
|
+ var x = xyz[1]
|
|
|
|
+ var y = xyz[2]
|
|
|
|
+ y = Math.pow(2, z) - 1 - y
|
|
|
|
+ console.log(x,y,z)
|
|
|
|
+ return "http://rt1.map.gtimg.com/realtimerender?z="
|
|
|
|
+ + z + "&x=" + x + "&y=" + y +
|
|
|
|
+ "&type=vector&style=0"
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}),
|
|
}),
|
|
|
|
+
|
|
|
|
+ // 天地图 矢量地图
|
|
|
|
+ // new TileLayer({
|
|
|
|
+ // class: 'basemap',
|
|
|
|
+ // title: 'tiandi',
|
|
|
|
+ // source: new XYZ({
|
|
|
|
+ // url: 'https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
|
|
|
|
+ // }),
|
|
|
|
+ // visible: true
|
|
|
|
+ // // nameCN: '在线地图'
|
|
|
|
+ // }),
|
|
|
|
+
|
|
// 天地图 地图标注
|
|
// 天地图 地图标注
|
|
- new TileLayer({
|
|
|
|
- class: 'basemap',
|
|
|
|
- title: 'tiandi',
|
|
|
|
- source: new XYZ({
|
|
|
|
- url: 'https://t3.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
|
|
|
|
- }),
|
|
|
|
- visible: true
|
|
|
|
- // nameCN: '天地图标注'
|
|
|
|
- }),
|
|
|
|
|
|
+ // new TileLayer({
|
|
|
|
+ // class: 'basemap',
|
|
|
|
+ // title: 'tiandi',
|
|
|
|
+ // source: new XYZ({
|
|
|
|
+ // url: 'https://t3.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
|
|
|
|
+ // }),
|
|
|
|
+ // visible: true
|
|
|
|
+ // // nameCN: '天地图标注'
|
|
|
|
+ // }),
|
|
|
|
+
|
|
// 文化地图
|
|
// 文化地图
|
|
new TileLayer({
|
|
new TileLayer({
|
|
class: 'basemap',
|
|
class: 'basemap',
|
|
title: 'cdut',
|
|
title: 'cdut',
|
|
source: new TileSource({
|
|
source: new TileSource({
|
|
- // url: 'http://cn-cd-ali-1.natfrp.cloud:10265/geoserver/CDUT/wms',
|
|
|
|
- // url: 'http://113.125.147.162:8081/geoserver/CDUT/wms',
|
|
|
|
- // url: 'http://139.155.247.43/geoserver/CDUT/wms',
|
|
|
|
url: 'https://geo.itopmap.com/geoserver/CDUT/wms',
|
|
url: 'https://geo.itopmap.com/geoserver/CDUT/wms',
|
|
crossOrigin: 'anonymous',
|
|
crossOrigin: 'anonymous',
|
|
params: {
|
|
params: {
|