|
@@ -3,6 +3,8 @@ import * as source from 'ol/source'
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
import LutuImg from './images/bg-land.png'
|
|
import LutuImg from './images/bg-land.png'
|
|
|
|
|
|
|
|
+const isInternet = window.location.origin.includes('74.10') ? false : true
|
|
|
|
+
|
|
const baseMapView = {
|
|
const baseMapView = {
|
|
center: [109.6915958479584, 19.111636735969318],
|
|
center: [109.6915958479584, 19.111636735969318],
|
|
projection: "EPSG:4326",
|
|
projection: "EPSG:4326",
|
|
@@ -10,21 +12,19 @@ const baseMapView = {
|
|
// extent: [120.8953306326286,31.3667480047968,121.37735577911297,31.692561298253832]
|
|
// extent: [120.8953306326286,31.3667480047968,121.37735577911297,31.692561298253832]
|
|
}
|
|
}
|
|
const initInternet = (obj) => {
|
|
const initInternet = (obj) => {
|
|
- const _layer = new layer.Tile({
|
|
|
|
|
|
+
|
|
|
|
+ const _layer = isInternet ? new layer.Tile({
|
|
source: new source.XYZ({
|
|
source: new source.XYZ({
|
|
url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}'
|
|
url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}'
|
|
}),
|
|
}),
|
|
visible: obj.visible,
|
|
visible: obj.visible,
|
|
|
|
+ }) : new layer.Tile({
|
|
|
|
+ source: new source.XYZ({
|
|
|
|
+ projection: "EPSG:4326",
|
|
|
|
+ url: `/EzServer6-api/EzServer6/Maps/${obj.key}/EzMap?Service=getImage&Type=RGB&ZoomOffset=0&Col={x}&Row={y}&Zoom={z}&V=0.3`,
|
|
|
|
+ }),
|
|
|
|
+ visible: obj.visible,
|
|
})
|
|
})
|
|
-
|
|
|
|
- // const _layer = new layer.Tile({
|
|
|
|
- // source: new source.XYZ({
|
|
|
|
- // projection: "EPSG:4326",
|
|
|
|
- // url: `/EzServer6-api/EzServer6/Maps/${obj.key}/EzMap?Service=getImage&Type=RGB&ZoomOffset=0&Col={x}&Row={y}&Zoom={z}&V=0.3`,
|
|
|
|
- // }),
|
|
|
|
- // visible: obj.visible,
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
_layer.set('_maxZoom', obj.maxZoom)
|
|
_layer.set('_maxZoom', obj.maxZoom)
|
|
_layer.set('_minZoom', obj.minZoom)
|
|
_layer.set('_minZoom', obj.minZoom)
|
|
_layer.set('_easyMapOl_layerName', obj.name)
|
|
_layer.set('_easyMapOl_layerName', obj.name)
|