xy-map 1.1.31 → 1.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/xy-map.common.js +24 -11
- package/xy-map.umd.js +24 -11
- package/xy-map.umd.min.js +1 -1
package/package.json
CHANGED
package/xy-map.common.js
CHANGED
|
@@ -43868,7 +43868,9 @@ var defaultOptions = {
|
|
|
43868
43868
|
'sources': {
|
|
43869
43869
|
'nav': {
|
|
43870
43870
|
'type': 'raster',
|
|
43871
|
-
'tiles': [
|
|
43871
|
+
'tiles': [
|
|
43872
|
+
// 'https://tiles2.geovisearth.com/base/v1/img/{z}/{x}/{y}?format=webp&tmsIds=w&token=74b34fe951b7f641aacb67fbfb0dfb14a445c7ae4481de804740e8b297d6fdec', // 星球影像
|
|
43873
|
+
'https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg' // mapbox
|
|
43872
43874
|
// 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', // ArcGIS
|
|
43873
43875
|
// 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}', // 高德
|
|
43874
43876
|
// 'https://map.ynmdgq.com/{z}/{x}/{y}.png' // 本地
|
|
@@ -43884,6 +43886,12 @@ var defaultOptions = {
|
|
|
43884
43886
|
'source': 'nav'
|
|
43885
43887
|
}]
|
|
43886
43888
|
},
|
|
43889
|
+
light: {
|
|
43890
|
+
anchor: 'map',
|
|
43891
|
+
// “viewport”:光照位置不变,所以building旋转的时候,其表面明暗程度会变化; “map”:光照随地图位置变化,所以buliding旋转的时候,其表面明显程度不会变化了
|
|
43892
|
+
color: 'white',
|
|
43893
|
+
intensity: 0.4
|
|
43894
|
+
},
|
|
43887
43895
|
is3d: true,
|
|
43888
43896
|
// 3d视图
|
|
43889
43897
|
antialias: false,
|
|
@@ -70906,15 +70914,20 @@ const addLayerPoint = (option, layerId) => {
|
|
|
70906
70914
|
/**
|
|
70907
70915
|
* 添加闪烁点图层
|
|
70908
70916
|
*/
|
|
70909
|
-
const addFlashPoint = (option = {
|
|
70910
|
-
id: 'flash',
|
|
70911
|
-
data: [],
|
|
70912
|
-
time: 0,
|
|
70913
|
-
// 闪烁时间
|
|
70914
|
-
size: 140 // 大小
|
|
70915
|
-
}, layerId) => {
|
|
70917
|
+
const addFlashPoint = (option = {}, layerId) => {
|
|
70916
70918
|
// 点
|
|
70917
70919
|
|
|
70920
|
+
option = Object.assign({}, {
|
|
70921
|
+
id: 'flash',
|
|
70922
|
+
data: [],
|
|
70923
|
+
time: 0,
|
|
70924
|
+
// 闪烁时间
|
|
70925
|
+
size: 140,
|
|
70926
|
+
// 大小
|
|
70927
|
+
outerRgb: [255, 255, 255],
|
|
70928
|
+
centerColor: 'rgba(255, 100, 100, 1)',
|
|
70929
|
+
strokeColor: '#fff'
|
|
70930
|
+
}, option);
|
|
70918
70931
|
let {
|
|
70919
70932
|
map
|
|
70920
70933
|
} = package_map;
|
|
@@ -70940,14 +70953,14 @@ const addFlashPoint = (option = {
|
|
|
70940
70953
|
context.clearRect(0, 0, this.width, this.height);
|
|
70941
70954
|
context.beginPath();
|
|
70942
70955
|
context.arc(this.width / 2, this.height / 2, outerRadius, 0, Math.PI * 2);
|
|
70943
|
-
context.fillStyle = `rgba(
|
|
70956
|
+
context.fillStyle = `rgba(${option.outerRgb[0]}, ${option.outerRgb[1]}, ${option.outerRgb[2]}, ${1 - t})`;
|
|
70944
70957
|
context.fill();
|
|
70945
70958
|
|
|
70946
70959
|
// Draw the inner circle.
|
|
70947
70960
|
context.beginPath();
|
|
70948
70961
|
context.arc(this.width / 2, this.height / 2, radius, 0, Math.PI * 2);
|
|
70949
|
-
context.fillStyle =
|
|
70950
|
-
context.strokeStyle =
|
|
70962
|
+
context.fillStyle = option.centerColor;
|
|
70963
|
+
context.strokeStyle = option.strokeColor;
|
|
70951
70964
|
context.lineWidth = 2 + 4 * (1 - t);
|
|
70952
70965
|
context.fill();
|
|
70953
70966
|
context.stroke();
|
package/xy-map.umd.js
CHANGED
|
@@ -43886,7 +43886,9 @@ var defaultOptions = {
|
|
|
43886
43886
|
'sources': {
|
|
43887
43887
|
'nav': {
|
|
43888
43888
|
'type': 'raster',
|
|
43889
|
-
'tiles': [
|
|
43889
|
+
'tiles': [
|
|
43890
|
+
// 'https://tiles2.geovisearth.com/base/v1/img/{z}/{x}/{y}?format=webp&tmsIds=w&token=74b34fe951b7f641aacb67fbfb0dfb14a445c7ae4481de804740e8b297d6fdec', // 星球影像
|
|
43891
|
+
'https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg' // mapbox
|
|
43890
43892
|
// 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', // ArcGIS
|
|
43891
43893
|
// 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}', // 高德
|
|
43892
43894
|
// 'https://map.ynmdgq.com/{z}/{x}/{y}.png' // 本地
|
|
@@ -43902,6 +43904,12 @@ var defaultOptions = {
|
|
|
43902
43904
|
'source': 'nav'
|
|
43903
43905
|
}]
|
|
43904
43906
|
},
|
|
43907
|
+
light: {
|
|
43908
|
+
anchor: 'map',
|
|
43909
|
+
// “viewport”:光照位置不变,所以building旋转的时候,其表面明暗程度会变化; “map”:光照随地图位置变化,所以buliding旋转的时候,其表面明显程度不会变化了
|
|
43910
|
+
color: 'white',
|
|
43911
|
+
intensity: 0.4
|
|
43912
|
+
},
|
|
43905
43913
|
is3d: true,
|
|
43906
43914
|
// 3d视图
|
|
43907
43915
|
antialias: false,
|
|
@@ -70924,15 +70932,20 @@ const addLayerPoint = (option, layerId) => {
|
|
|
70924
70932
|
/**
|
|
70925
70933
|
* 添加闪烁点图层
|
|
70926
70934
|
*/
|
|
70927
|
-
const addFlashPoint = (option = {
|
|
70928
|
-
id: 'flash',
|
|
70929
|
-
data: [],
|
|
70930
|
-
time: 0,
|
|
70931
|
-
// 闪烁时间
|
|
70932
|
-
size: 140 // 大小
|
|
70933
|
-
}, layerId) => {
|
|
70935
|
+
const addFlashPoint = (option = {}, layerId) => {
|
|
70934
70936
|
// 点
|
|
70935
70937
|
|
|
70938
|
+
option = Object.assign({}, {
|
|
70939
|
+
id: 'flash',
|
|
70940
|
+
data: [],
|
|
70941
|
+
time: 0,
|
|
70942
|
+
// 闪烁时间
|
|
70943
|
+
size: 140,
|
|
70944
|
+
// 大小
|
|
70945
|
+
outerRgb: [255, 255, 255],
|
|
70946
|
+
centerColor: 'rgba(255, 100, 100, 1)',
|
|
70947
|
+
strokeColor: '#fff'
|
|
70948
|
+
}, option);
|
|
70936
70949
|
let {
|
|
70937
70950
|
map
|
|
70938
70951
|
} = package_map;
|
|
@@ -70958,14 +70971,14 @@ const addFlashPoint = (option = {
|
|
|
70958
70971
|
context.clearRect(0, 0, this.width, this.height);
|
|
70959
70972
|
context.beginPath();
|
|
70960
70973
|
context.arc(this.width / 2, this.height / 2, outerRadius, 0, Math.PI * 2);
|
|
70961
|
-
context.fillStyle = `rgba(
|
|
70974
|
+
context.fillStyle = `rgba(${option.outerRgb[0]}, ${option.outerRgb[1]}, ${option.outerRgb[2]}, ${1 - t})`;
|
|
70962
70975
|
context.fill();
|
|
70963
70976
|
|
|
70964
70977
|
// Draw the inner circle.
|
|
70965
70978
|
context.beginPath();
|
|
70966
70979
|
context.arc(this.width / 2, this.height / 2, radius, 0, Math.PI * 2);
|
|
70967
|
-
context.fillStyle =
|
|
70968
|
-
context.strokeStyle =
|
|
70980
|
+
context.fillStyle = option.centerColor;
|
|
70981
|
+
context.strokeStyle = option.strokeColor;
|
|
70969
70982
|
context.lineWidth = 2 + 4 * (1 - t);
|
|
70970
70983
|
context.fill();
|
|
70971
70984
|
context.stroke();
|