@antv/l7-layers 2.9.27-alpha.3 → 2.9.27
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/es/Geometry/models/billboard.js +2 -5
- package/es/Geometry/models/plane.js +3 -3
- package/es/Geometry/models/sprite.js +2 -3
- package/es/core/BaseLayer.d.ts +5 -6
- package/es/core/BaseLayer.js +15 -20
- package/es/core/BaseModel.d.ts +1 -1
- package/es/core/BaseModel.js +15 -16
- package/es/core/interface.d.ts +3 -1
- package/es/earth/models/atmosphere.js +4 -7
- package/es/earth/models/base.js +10 -14
- package/es/earth/models/bloomsphere.js +4 -8
- package/es/heatmap/index.d.ts +2 -2
- package/es/heatmap/index.js +1 -3
- package/es/heatmap/models/grid.js +1 -3
- package/es/heatmap/models/grid3d.js +4 -11
- package/es/heatmap/models/heatmap.js +3 -6
- package/es/heatmap/models/hexagon.js +2 -6
- package/es/heatmap/triangulation.js +0 -1
- package/es/image/index.d.ts +1 -1
- package/es/image/index.js +4 -1
- package/es/image/models/dataImage.d.ts +1 -1
- package/es/image/models/dataImage.js +12 -34
- package/es/image/models/image.js +1 -3
- package/es/image/models/index.d.ts +1 -1
- package/es/image/models/index.js +3 -1
- package/es/image/models/tileDataImage.d.ts +19 -0
- package/es/image/models/tileDataImage.js +174 -0
- package/es/line/models/arc.js +7 -8
- package/es/line/models/arc_3d.js +8 -10
- package/es/line/models/earthArc_3d.js +8 -10
- package/es/line/models/great_circle.js +7 -7
- package/es/line/models/line.js +4 -4
- package/es/line/models/linearline.js +3 -4
- package/es/line/models/simpleLine.js +3 -3
- package/es/line/models/tile.js +1 -1
- package/es/line/models/wall.js +3 -3
- package/es/line/shaders/dash/line_dash_frag.glsl +1 -1
- package/es/line/shaders/line_arc2d_vert.glsl +2 -2
- package/es/line/shaders/line_arc_3d_frag.glsl +10 -10
- package/es/line/shaders/line_arc_3d_vert.glsl +3 -4
- package/es/line/shaders/line_arc_frag.glsl +9 -10
- package/es/line/shaders/line_arc_great_circle_frag.glsl +6 -6
- package/es/line/shaders/line_arc_great_circle_vert.glsl +2 -3
- package/es/line/shaders/line_arc_vert.glsl +2 -2
- package/es/line/shaders/line_bezier_vert.glsl +2 -2
- package/es/line/shaders/line_frag.glsl +5 -5
- package/es/line/shaders/line_vert.glsl +1 -1
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +6 -7
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +9 -10
- package/es/line/shaders/linear/arc_linear_frag.glsl +1 -1
- package/es/line/shaders/wall/wall_frag.glsl +5 -5
- package/es/line/shaders/wall/wall_vert.glsl +2 -2
- package/es/plugins/LayerAnimateStylePlugin.js +2 -2
- package/es/point/index.js +3 -4
- package/es/point/models/earthExtrude.d.ts +1 -1
- package/es/point/models/earthExtrude.js +9 -14
- package/es/point/models/earthFill.js +2 -2
- package/es/point/models/extrude.d.ts +1 -1
- package/es/point/models/extrude.js +9 -12
- package/es/point/models/fill.d.ts +1 -1
- package/es/point/models/fill.js +7 -8
- package/es/point/models/fillmage.js +4 -5
- package/es/point/models/image.js +2 -2
- package/es/point/models/index.d.ts +1 -1
- package/es/point/models/index.js +3 -3
- package/es/point/models/normal.js +0 -2
- package/es/point/models/radar.js +1 -1
- package/es/point/models/text.js +1 -3
- package/es/point/models/tile.js +2 -3
- package/es/point/models/tileText.js +3 -5
- package/es/point/shaders/animate/wave_frag.glsl +2 -2
- package/es/polygon/models/extrude.js +3 -5
- package/es/raster/index.js +1 -2
- package/es/raster/models/raster.d.ts +1 -1
- package/es/raster/models/raster.js +5 -5
- package/es/raster/models/rasterTile.d.ts +18 -0
- package/es/raster/models/rasterTile.js +140 -0
- package/es/raster/shaders/raster_2d_frag.glsl +0 -2
- package/es/raster/shaders/raster_2d_vert.glsl +0 -1
- package/es/tile/manager/baseMapTileLayerManager.d.ts +3 -25
- package/es/tile/manager/baseMapTileLayerManager.js +31 -119
- package/es/tile/manager/baseTileManager.d.ts +27 -0
- package/es/tile/manager/baseTileManager.js +107 -0
- package/es/tile/manager/tileLayerManager.d.ts +4 -26
- package/es/tile/manager/tileLayerManager.js +64 -132
- package/es/tile/manager/tilePickerManager.d.ts +1 -0
- package/es/tile/manager/tilePickerManager.js +5 -0
- package/es/tile/models/tileModel.d.ts +1 -0
- package/es/tile/models/tileModel.js +3 -0
- package/es/tile/tileFactory/rasterData.js +9 -11
- package/es/tile/tileFactory/rasterDataLayer.d.ts +1 -1
- package/es/tile/tileFactory/rasterDataLayer.js +1 -1
- package/es/tile/tileLayer/baseMapTileLayer.d.ts +1 -0
- package/es/tile/tileLayer/baseMapTileLayer.js +7 -0
- package/es/tile/tileLayer/baseTileLayer.d.ts +1 -0
- package/es/tile/tileLayer/baseTileLayer.js +12 -1
- package/es/tile/tmsMapTileLayer.js +2 -2
- package/es/tile/tmsTileLayer.js +2 -2
- package/es/tile/utils.d.ts +1 -0
- package/es/tile/utils.js +13 -0
- package/lib/Geometry/models/billboard.js +2 -5
- package/lib/Geometry/models/plane.js +3 -3
- package/lib/Geometry/models/sprite.js +2 -3
- package/lib/core/BaseLayer.js +15 -20
- package/lib/core/BaseModel.js +15 -16
- package/lib/earth/models/atmosphere.js +4 -7
- package/lib/earth/models/base.js +10 -14
- package/lib/earth/models/bloomsphere.js +4 -8
- package/lib/heatmap/index.js +1 -3
- package/lib/heatmap/models/grid.js +1 -3
- package/lib/heatmap/models/grid3d.js +4 -11
- package/lib/heatmap/models/heatmap.js +3 -6
- package/lib/heatmap/models/hexagon.js +2 -6
- package/lib/heatmap/triangulation.js +0 -1
- package/lib/image/index.js +4 -1
- package/lib/image/models/dataImage.js +11 -33
- package/lib/image/models/image.js +1 -3
- package/lib/image/models/index.js +4 -1
- package/lib/image/models/tileDataImage.js +188 -0
- package/lib/line/models/arc.js +7 -8
- package/lib/line/models/arc_3d.js +8 -10
- package/lib/line/models/earthArc_3d.js +8 -10
- package/lib/line/models/great_circle.js +7 -7
- package/lib/line/models/line.js +4 -4
- package/lib/line/models/linearline.js +3 -4
- package/lib/line/models/simpleLine.js +3 -3
- package/lib/line/models/tile.js +1 -1
- package/lib/line/models/wall.js +3 -3
- package/lib/line/shaders/dash/line_dash_frag.glsl +1 -1
- package/lib/line/shaders/line_arc2d_vert.glsl +2 -2
- package/lib/line/shaders/line_arc_3d_frag.glsl +10 -10
- package/lib/line/shaders/line_arc_3d_vert.glsl +3 -4
- package/lib/line/shaders/line_arc_frag.glsl +9 -10
- package/lib/line/shaders/line_arc_great_circle_frag.glsl +6 -6
- package/lib/line/shaders/line_arc_great_circle_vert.glsl +2 -3
- package/lib/line/shaders/line_arc_vert.glsl +2 -2
- package/lib/line/shaders/line_bezier_vert.glsl +2 -2
- package/lib/line/shaders/line_frag.glsl +5 -5
- package/lib/line/shaders/line_vert.glsl +1 -1
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +6 -7
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +9 -10
- package/lib/line/shaders/linear/arc_linear_frag.glsl +1 -1
- package/lib/line/shaders/wall/wall_frag.glsl +5 -5
- package/lib/line/shaders/wall/wall_vert.glsl +2 -2
- package/lib/plugins/LayerAnimateStylePlugin.js +2 -2
- package/lib/point/index.js +3 -4
- package/lib/point/models/earthExtrude.js +9 -14
- package/lib/point/models/earthFill.js +2 -2
- package/lib/point/models/extrude.js +9 -12
- package/lib/point/models/fill.js +7 -8
- package/lib/point/models/fillmage.js +4 -5
- package/lib/point/models/image.js +2 -2
- package/lib/point/models/index.js +1 -1
- package/lib/point/models/normal.js +0 -2
- package/lib/point/models/radar.js +1 -1
- package/lib/point/models/text.js +1 -3
- package/lib/point/models/tile.js +2 -3
- package/lib/point/models/tileText.js +3 -5
- package/lib/point/shaders/animate/wave_frag.glsl +2 -2
- package/lib/polygon/models/extrude.js +3 -5
- package/lib/raster/index.js +1 -2
- package/lib/raster/models/raster.js +5 -5
- package/lib/raster/models/rasterTile.js +154 -0
- package/lib/raster/shaders/raster_2d_frag.glsl +0 -2
- package/lib/raster/shaders/raster_2d_vert.glsl +0 -1
- package/lib/tile/manager/baseMapTileLayerManager.js +33 -121
- package/lib/tile/manager/baseTileManager.js +121 -0
- package/lib/tile/manager/tileLayerManager.js +66 -134
- package/lib/tile/manager/tilePickerManager.js +5 -0
- package/lib/tile/models/tileModel.js +3 -0
- package/lib/tile/tileFactory/rasterData.js +9 -11
- package/lib/tile/tileFactory/rasterDataLayer.js +2 -2
- package/lib/tile/tileLayer/baseMapTileLayer.js +7 -0
- package/lib/tile/tileLayer/baseTileLayer.js +12 -1
- package/lib/tile/tmsMapTileLayer.js +1 -1
- package/lib/tile/tmsTileLayer.js +1 -1
- package/lib/tile/utils.js +16 -0
- package/package.json +6 -6
package/lib/core/BaseLayer.js
CHANGED
|
@@ -149,9 +149,9 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
149
149
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "currentPickId", null);
|
|
150
150
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pendingStyleAttributes", []);
|
|
151
151
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scaleOptions", {});
|
|
152
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
152
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "animateStatus", false);
|
|
153
153
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "bottomColor", 'rgba(0, 0, 0, 0)');
|
|
154
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
154
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isDestroyed", false);
|
|
155
155
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "encodeDataLength", 0);
|
|
156
156
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sourceEvent", function () {
|
|
157
157
|
_this.dataState.dataSourceNeedUpdate = true;
|
|
@@ -251,11 +251,6 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
251
251
|
}, {
|
|
252
252
|
key: "addPlugin",
|
|
253
253
|
value: function addPlugin(plugin) {
|
|
254
|
-
// TODO: 控制插件注册顺序
|
|
255
|
-
// @example:
|
|
256
|
-
// pointLayer.addPlugin(new MyCustomPlugin(), {
|
|
257
|
-
// before: 'L7BuiltinPlugin'
|
|
258
|
-
// });
|
|
259
254
|
this.plugins.push(plugin);
|
|
260
255
|
return this;
|
|
261
256
|
}
|
|
@@ -418,7 +413,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
418
413
|
|
|
419
414
|
if (animateOption !== null && animateOption !== void 0 && animateOption.enable) {
|
|
420
415
|
this.layerService.startAnimate();
|
|
421
|
-
this.
|
|
416
|
+
this.animateStatus = true;
|
|
422
417
|
}
|
|
423
418
|
}
|
|
424
419
|
}, {
|
|
@@ -497,8 +492,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
497
492
|
|
|
498
493
|
this.updateLayerConfig({
|
|
499
494
|
animateOption: rawAnimate
|
|
500
|
-
});
|
|
501
|
-
|
|
495
|
+
});
|
|
502
496
|
return this;
|
|
503
497
|
}
|
|
504
498
|
}, {
|
|
@@ -955,11 +949,11 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
955
949
|
}, {
|
|
956
950
|
key: "destroy",
|
|
957
951
|
value: function destroy() {
|
|
958
|
-
var _this$multiPassRender, _this$layerModel2;
|
|
952
|
+
var _this$multiPassRender, _this$layerModel2, _this$tileLayer;
|
|
959
953
|
|
|
960
954
|
var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
961
955
|
|
|
962
|
-
if (this.
|
|
956
|
+
if (this.isDestroyed) {
|
|
963
957
|
return;
|
|
964
958
|
} // remove child layer
|
|
965
959
|
|
|
@@ -983,6 +977,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
983
977
|
this.hooks.afterDestroy.call(); // Tip: 清除各个图层自定义的 models 资源
|
|
984
978
|
|
|
985
979
|
(_this$layerModel2 = this.layerModel) === null || _this$layerModel2 === void 0 ? void 0 : _this$layerModel2.clearModels(refresh);
|
|
980
|
+
(_this$tileLayer = this.tileLayer) === null || _this$tileLayer === void 0 ? void 0 : _this$tileLayer.destroy();
|
|
986
981
|
this.models = [];
|
|
987
982
|
this.layerService.cleanRemove(this, refresh);
|
|
988
983
|
this.emit('remove', {
|
|
@@ -996,7 +991,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
996
991
|
this.removeAllListeners(); // 解绑图层容器中的服务
|
|
997
992
|
// this.container.unbind(TYPES.IStyleAttributeService);
|
|
998
993
|
|
|
999
|
-
this.
|
|
994
|
+
this.isDestroyed = true;
|
|
1000
995
|
}
|
|
1001
996
|
}, {
|
|
1002
997
|
key: "clear",
|
|
@@ -1181,7 +1176,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
1181
1176
|
elements = _this9$styleAttribute.elements,
|
|
1182
1177
|
count = _this9$styleAttribute.count;
|
|
1183
1178
|
|
|
1184
|
-
var
|
|
1179
|
+
var modelOptions = (0, _objectSpread2.default)({
|
|
1185
1180
|
attributes: attributes,
|
|
1186
1181
|
uniforms: uniforms,
|
|
1187
1182
|
fs: fs,
|
|
@@ -1191,18 +1186,18 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
1191
1186
|
}, rest);
|
|
1192
1187
|
|
|
1193
1188
|
if (count) {
|
|
1194
|
-
|
|
1189
|
+
modelOptions.count = count;
|
|
1195
1190
|
}
|
|
1196
1191
|
|
|
1197
|
-
var m = createModel(
|
|
1192
|
+
var m = createModel(modelOptions);
|
|
1198
1193
|
resolve(m);
|
|
1199
1194
|
}
|
|
1200
1195
|
});
|
|
1201
1196
|
});
|
|
1202
1197
|
}
|
|
1203
1198
|
}, {
|
|
1204
|
-
key: "
|
|
1205
|
-
value: function
|
|
1199
|
+
key: "createAttributes",
|
|
1200
|
+
value: function createAttributes(options) {
|
|
1206
1201
|
var triangulation = options.triangulation; // @ts-ignore
|
|
1207
1202
|
|
|
1208
1203
|
var _this$styleAttributeS4 = this.styleAttributeService.createAttributes(this.encodedData, triangulation),
|
|
@@ -1223,9 +1218,9 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
1223
1218
|
}, {
|
|
1224
1219
|
key: "stopAnimate",
|
|
1225
1220
|
value: function stopAnimate() {
|
|
1226
|
-
if (this.
|
|
1221
|
+
if (this.animateStatus) {
|
|
1227
1222
|
this.layerService.stopAnimate();
|
|
1228
|
-
this.
|
|
1223
|
+
this.animateStatus = false;
|
|
1229
1224
|
this.updateLayerConfig({
|
|
1230
1225
|
animateOption: {
|
|
1231
1226
|
enable: false
|
package/lib/core/BaseModel.js
CHANGED
|
@@ -79,7 +79,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
79
79
|
stroke: undefined,
|
|
80
80
|
offsets: undefined
|
|
81
81
|
};
|
|
82
|
-
this.
|
|
82
|
+
this.stylePropertiesExist = {
|
|
83
83
|
hasThetaOffset: 0,
|
|
84
84
|
hasOpacity: 0,
|
|
85
85
|
hasStrokeOpacity: 0,
|
|
@@ -115,7 +115,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
115
115
|
|
|
116
116
|
this.cellLength = 0; // 清空上一次计算的 cell 的长度
|
|
117
117
|
|
|
118
|
-
this.
|
|
118
|
+
this.stylePropertiesExist = {
|
|
119
119
|
// 全量清空上一次是否需要对 style 属性进行数据映射的判断
|
|
120
120
|
hasThetaOffset: 0,
|
|
121
121
|
hasOpacity: 0,
|
|
@@ -133,13 +133,13 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
133
133
|
this.rowCount, // 数据纹理有几行
|
|
134
134
|
this.DATA_TEXTURE_WIDTH, // 数据纹理有几列
|
|
135
135
|
0.0, 0.0, // 1
|
|
136
|
-
this.
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
136
|
+
this.stylePropertiesExist.hasOpacity, // cell 中是否存在 opacity
|
|
137
|
+
this.stylePropertiesExist.hasStrokeOpacity, // cell 中是否存在 strokeOpacity
|
|
138
|
+
this.stylePropertiesExist.hasStrokeWidth, // cell 中是否存在 strokeWidth
|
|
139
|
+
this.stylePropertiesExist.hasStroke, // cell 中是否存在 stroke
|
|
140
140
|
// 2
|
|
141
|
-
this.
|
|
142
|
-
this.
|
|
141
|
+
this.stylePropertiesExist.hasOffsets, // cell 中是否存在 offsets
|
|
142
|
+
this.stylePropertiesExist.hasThetaOffset, // cell 中是否存在 thetaOffset
|
|
143
143
|
0.0, 0.0, // 3
|
|
144
144
|
0.0, 0.0, 0.0, 1.0];
|
|
145
145
|
} else {
|
|
@@ -216,7 +216,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
216
216
|
attr: 'opacity',
|
|
217
217
|
count: 1
|
|
218
218
|
});
|
|
219
|
-
this.
|
|
219
|
+
this.stylePropertiesExist.hasOpacity = 1;
|
|
220
220
|
this.cellLength += 1;
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -226,7 +226,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
226
226
|
attr: 'strokeOpacity',
|
|
227
227
|
count: 1
|
|
228
228
|
});
|
|
229
|
-
this.
|
|
229
|
+
this.stylePropertiesExist.hasStrokeOpacity = 1;
|
|
230
230
|
this.cellLength += 1;
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -236,7 +236,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
236
236
|
attr: 'strokeWidth',
|
|
237
237
|
count: 1
|
|
238
238
|
});
|
|
239
|
-
this.
|
|
239
|
+
this.stylePropertiesExist.hasStrokeWidth = 1;
|
|
240
240
|
this.cellLength += 1;
|
|
241
241
|
}
|
|
242
242
|
|
|
@@ -246,7 +246,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
246
246
|
attr: 'stroke',
|
|
247
247
|
count: 4
|
|
248
248
|
});
|
|
249
|
-
this.
|
|
249
|
+
this.stylePropertiesExist.hasStroke = 1;
|
|
250
250
|
this.cellLength += 4;
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -256,7 +256,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
256
256
|
attr: 'offsets',
|
|
257
257
|
count: 2
|
|
258
258
|
});
|
|
259
|
-
this.
|
|
259
|
+
this.stylePropertiesExist.hasOffsets = 1;
|
|
260
260
|
this.cellLength += 2;
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -266,10 +266,9 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
266
266
|
attr: 'thetaOffset',
|
|
267
267
|
count: 1
|
|
268
268
|
});
|
|
269
|
-
this.
|
|
269
|
+
this.stylePropertiesExist.hasThetaOffset = 1;
|
|
270
270
|
this.cellLength += 1;
|
|
271
|
-
}
|
|
272
|
-
|
|
271
|
+
}
|
|
273
272
|
}
|
|
274
273
|
/**
|
|
275
274
|
* 判断变量 stroke 是否是常量值
|
|
@@ -30,7 +30,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
30
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
31
|
|
|
32
32
|
/* babel-plugin-inline-import '../shaders/atmosphere_frag.glsl' */
|
|
33
|
-
var atmoSphereFrag = "\nuniform float u_opacity;\nuniform vec3 u_CameraPosition;\n\nvarying vec3 vVertexNormal;\nvarying float v_offset;\nvarying vec4 v_Color;\nvoid main() {\n \n \n // float intensity = pow(0.5 + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\n float intensity = pow(v_offset + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\n //
|
|
33
|
+
var atmoSphereFrag = "\nuniform float u_opacity;\nuniform vec3 u_CameraPosition;\n\nvarying vec3 vVertexNormal;\nvarying float v_offset;\nvarying vec4 v_Color;\nvoid main() {\n \n \n // float intensity = pow(0.5 + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\n float intensity = pow(v_offset + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\n // \u53BB\u9664\u80CC\u9762\n if(intensity > 1.0) intensity = 0.0;\n\n gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\n}\n";
|
|
34
34
|
|
|
35
35
|
/* babel-plugin-inline-import '../shaders/atmosphere_vert.glsl' */
|
|
36
36
|
var atmoSphereVert = "\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute vec2 a_Uv;\nattribute vec4 a_Color;\nuniform vec3 u_CameraPosition;\nvarying float v_CamreaDistance;\n\nuniform mat4 u_ViewProjectionMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_ViewMatrix;\n\nvarying vec3 vVertexNormal;\nvarying vec4 v_Color;\nvarying float v_offset;\n\nvoid main() {\n float EARTH_RADIUS = 100.0;\n \n v_Color = a_Color;\n\n v_offset = min(((length(u_CameraPosition) - EARTH_RADIUS)/600.0) * 0.5 + 0.4, 1.0);\n vVertexNormal = a_Normal;\n\n gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0);\n}\n";
|
|
@@ -72,7 +72,7 @@ var EarthAtomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
72
72
|
// TODO: 调整图层的绘制顺序 地球大气层
|
|
73
73
|
this.layer.zIndex = -997;
|
|
74
74
|
this.layer.buildLayerModel({
|
|
75
|
-
moduleName: '
|
|
75
|
+
moduleName: 'earthAtmoSphere',
|
|
76
76
|
vertexShader: atmoSphereVert,
|
|
77
77
|
fragmentShader: atmoSphereFrag,
|
|
78
78
|
triangulation: _triangulation.earthTriangulation,
|
|
@@ -97,13 +97,12 @@ var EarthAtomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
97
97
|
descriptor: {
|
|
98
98
|
name: 'a_Size',
|
|
99
99
|
buffer: {
|
|
100
|
-
// give the WebGL driver a hint that this buffer may change
|
|
101
100
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
102
101
|
data: [],
|
|
103
102
|
type: _l7Core.gl.FLOAT
|
|
104
103
|
},
|
|
105
104
|
size: 1,
|
|
106
|
-
update: function update(feature
|
|
105
|
+
update: function update(feature) {
|
|
107
106
|
var _feature$size = feature.size,
|
|
108
107
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
109
108
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -116,7 +115,6 @@ var EarthAtomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
116
115
|
descriptor: {
|
|
117
116
|
name: 'a_Normal',
|
|
118
117
|
buffer: {
|
|
119
|
-
// give the WebGL driver a hint that this buffer may change
|
|
120
118
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
121
119
|
data: [],
|
|
122
120
|
type: _l7Core.gl.FLOAT
|
|
@@ -133,13 +131,12 @@ var EarthAtomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
133
131
|
descriptor: {
|
|
134
132
|
name: 'a_Uv',
|
|
135
133
|
buffer: {
|
|
136
|
-
// give the WebGL driver a hint that this buffer may change
|
|
137
134
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
138
135
|
data: [],
|
|
139
136
|
type: _l7Core.gl.FLOAT
|
|
140
137
|
},
|
|
141
138
|
size: 2,
|
|
142
|
-
update: function update(feature, featureIdx, vertex
|
|
139
|
+
update: function update(feature, featureIdx, vertex) {
|
|
143
140
|
return [vertex[3], vertex[4]];
|
|
144
141
|
}
|
|
145
142
|
}
|
package/lib/earth/models/base.js
CHANGED
|
@@ -65,7 +65,7 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
65
65
|
value: function getUninforms() {
|
|
66
66
|
var _this$layer$getLayerC = this.layer.getLayerConfig(),
|
|
67
67
|
animateOption = _this$layer$getLayerC.animateOption,
|
|
68
|
-
|
|
68
|
+
globalOptions = _this$layer$getLayerC.globalOptions;
|
|
69
69
|
|
|
70
70
|
if (animateOption !== null && animateOption !== void 0 && animateOption.enable) {
|
|
71
71
|
// @ts-ignore
|
|
@@ -80,13 +80,12 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
return {
|
|
83
|
-
u_ambientRatio: (
|
|
83
|
+
u_ambientRatio: (globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.ambientRatio) || 0.6,
|
|
84
84
|
// 环境光
|
|
85
|
-
u_diffuseRatio: (
|
|
85
|
+
u_diffuseRatio: (globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.diffuseRatio) || 0.4,
|
|
86
86
|
// 漫反射
|
|
87
|
-
u_specularRatio: (
|
|
87
|
+
u_specularRatio: (globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.specularRatio) || 0.1,
|
|
88
88
|
// 高光反射
|
|
89
|
-
// u_sunLight: [120, 120, 120],
|
|
90
89
|
u_sunLight: [this.sunX, this.sunY, this.sunZ],
|
|
91
90
|
u_texture: this.texture
|
|
92
91
|
};
|
|
@@ -106,10 +105,10 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
106
105
|
var _this2 = this;
|
|
107
106
|
|
|
108
107
|
var _this$layer$getLayerC2 = this.layer.getLayerConfig(),
|
|
109
|
-
|
|
108
|
+
globalOptions = _this$layer$getLayerC2.globalOptions;
|
|
110
109
|
|
|
111
|
-
if ((
|
|
112
|
-
this.setEarthTime(
|
|
110
|
+
if ((globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.earthTime) !== undefined) {
|
|
111
|
+
this.setEarthTime(globalOptions.earthTime);
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
var source = this.layer.getSource();
|
|
@@ -137,7 +136,7 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
137
136
|
}, {
|
|
138
137
|
key: "buildModels",
|
|
139
138
|
value: function buildModels(callbackModel) {
|
|
140
|
-
//
|
|
139
|
+
// Tip: 调整图层的绘制顺序 地球大气层
|
|
141
140
|
this.layer.zIndex = -998;
|
|
142
141
|
this.layer.buildLayerModel({
|
|
143
142
|
moduleName: 'earthBase',
|
|
@@ -158,20 +157,18 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
158
157
|
}, {
|
|
159
158
|
key: "registerBuiltinAttributes",
|
|
160
159
|
value: function registerBuiltinAttributes() {
|
|
161
|
-
// point layer size;
|
|
162
160
|
this.styleAttributeService.registerStyleAttribute({
|
|
163
161
|
name: 'size',
|
|
164
162
|
type: _l7Core.AttributeType.Attribute,
|
|
165
163
|
descriptor: {
|
|
166
164
|
name: 'a_Size',
|
|
167
165
|
buffer: {
|
|
168
|
-
// give the WebGL driver a hint that this buffer may change
|
|
169
166
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
170
167
|
data: [],
|
|
171
168
|
type: _l7Core.gl.FLOAT
|
|
172
169
|
},
|
|
173
170
|
size: 1,
|
|
174
|
-
update: function update(feature
|
|
171
|
+
update: function update(feature) {
|
|
175
172
|
var _feature$size = feature.size,
|
|
176
173
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
177
174
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -184,7 +181,6 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
184
181
|
descriptor: {
|
|
185
182
|
name: 'a_Normal',
|
|
186
183
|
buffer: {
|
|
187
|
-
// give the WebGL driver a hint that this buffer may change
|
|
188
184
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
189
185
|
data: [],
|
|
190
186
|
type: _l7Core.gl.FLOAT
|
|
@@ -207,7 +203,7 @@ var BaseEarthModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
207
203
|
type: _l7Core.gl.FLOAT
|
|
208
204
|
},
|
|
209
205
|
size: 2,
|
|
210
|
-
update: function update(feature, featureIdx, vertex
|
|
206
|
+
update: function update(feature, featureIdx, vertex) {
|
|
211
207
|
return [vertex[3], vertex[4]];
|
|
212
208
|
}
|
|
213
209
|
}
|
|
@@ -30,7 +30,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
30
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
31
|
|
|
32
32
|
/* babel-plugin-inline-import '../shaders/bloomsphere_frag.glsl' */
|
|
33
|
-
var bloomSphereFrag = "\nuniform float u_opacity;\nuniform vec3 u_CameraPosition;\nvarying vec3 vVertexNormal;\n\nvarying vec4 v_Color;\nvoid main() {\n\n\n float intensity = - dot(normalize(vVertexNormal), normalize(u_CameraPosition));\n //
|
|
33
|
+
var bloomSphereFrag = "\nuniform float u_opacity;\nuniform vec3 u_CameraPosition;\nvarying vec3 vVertexNormal;\n\nvarying vec4 v_Color;\nvoid main() {\n\n\n float intensity = - dot(normalize(vVertexNormal), normalize(u_CameraPosition));\n // \u53BB\u9664\u80CC\u9762\n if(intensity > 1.0) intensity = 0.0;\n\n gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\n}\n";
|
|
34
34
|
|
|
35
35
|
/* babel-plugin-inline-import '../shaders/bloomsphere_vert.glsl' */
|
|
36
36
|
var bloomSphereVert = "\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute vec2 a_Uv;\nattribute vec4 a_Color;\nuniform vec3 u_CameraPosition;\nuniform mat4 u_ViewProjectionMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_ViewMatrix;\n\nvarying vec3 vVertexNormal;\nvarying vec4 v_Color;\n\nvoid main() {\n v_Color = a_Color;\n\n vVertexNormal = a_Normal;\n\n gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0);\n}\n";
|
|
@@ -69,7 +69,7 @@ var EarthBloomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
69
69
|
}, {
|
|
70
70
|
key: "buildModels",
|
|
71
71
|
value: function buildModels(callbackModel) {
|
|
72
|
-
//
|
|
72
|
+
// Tip: 调整图层的绘制顺序,让它保持在地球后面(减少锯齿现象)
|
|
73
73
|
this.layer.zIndex = -999;
|
|
74
74
|
this.layer.buildLayerModel({
|
|
75
75
|
moduleName: 'earthBloom',
|
|
@@ -90,20 +90,18 @@ var EarthBloomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
90
90
|
}, {
|
|
91
91
|
key: "registerBuiltinAttributes",
|
|
92
92
|
value: function registerBuiltinAttributes() {
|
|
93
|
-
// point layer size;
|
|
94
93
|
this.styleAttributeService.registerStyleAttribute({
|
|
95
94
|
name: 'size',
|
|
96
95
|
type: _l7Core.AttributeType.Attribute,
|
|
97
96
|
descriptor: {
|
|
98
97
|
name: 'a_Size',
|
|
99
98
|
buffer: {
|
|
100
|
-
// give the WebGL driver a hint that this buffer may change
|
|
101
99
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
102
100
|
data: [],
|
|
103
101
|
type: _l7Core.gl.FLOAT
|
|
104
102
|
},
|
|
105
103
|
size: 1,
|
|
106
|
-
update: function update(feature
|
|
104
|
+
update: function update(feature) {
|
|
107
105
|
var _feature$size = feature.size,
|
|
108
106
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
109
107
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -116,7 +114,6 @@ var EarthBloomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
116
114
|
descriptor: {
|
|
117
115
|
name: 'a_Normal',
|
|
118
116
|
buffer: {
|
|
119
|
-
// give the WebGL driver a hint that this buffer may change
|
|
120
117
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
121
118
|
data: [],
|
|
122
119
|
type: _l7Core.gl.FLOAT
|
|
@@ -133,13 +130,12 @@ var EarthBloomSphereModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
133
130
|
descriptor: {
|
|
134
131
|
name: 'a_Uv',
|
|
135
132
|
buffer: {
|
|
136
|
-
// give the WebGL driver a hint that this buffer may change
|
|
137
133
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
138
134
|
data: [],
|
|
139
135
|
type: _l7Core.gl.FLOAT
|
|
140
136
|
},
|
|
141
137
|
size: 2,
|
|
142
|
-
update: function update(feature, featureIdx, vertex
|
|
138
|
+
update: function update(feature, featureIdx, vertex) {
|
|
143
139
|
return [vertex[3], vertex[4]];
|
|
144
140
|
}
|
|
145
141
|
}
|
package/lib/heatmap/index.js
CHANGED
|
@@ -92,9 +92,7 @@ var HeatMapLayer = /*#__PURE__*/function (_BaseLayer) {
|
|
|
92
92
|
if (this.layerModelNeedUpdate) {
|
|
93
93
|
this.layerModel.buildModels(function (models) {
|
|
94
94
|
return _this4.models = models;
|
|
95
|
-
});
|
|
96
|
-
// this.models = this.layerModel.buildModels();
|
|
97
|
-
|
|
95
|
+
});
|
|
98
96
|
this.layerModelNeedUpdate = false;
|
|
99
97
|
}
|
|
100
98
|
|
|
@@ -101,14 +101,12 @@ var GridModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
101
101
|
descriptor: {
|
|
102
102
|
name: 'a_Pos',
|
|
103
103
|
buffer: {
|
|
104
|
-
// give the WebGL driver a hint that this buffer may change
|
|
105
104
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
106
105
|
data: [],
|
|
107
106
|
type: _l7Core.gl.FLOAT
|
|
108
107
|
},
|
|
109
108
|
size: 3,
|
|
110
|
-
update: function update(feature
|
|
111
|
-
// const coordinates = feature.coordinates as number[];
|
|
109
|
+
update: function update(feature) {
|
|
112
110
|
var coordinates = feature.version === 'GAODE2.x' ? feature.originCoordinates : feature.coordinates;
|
|
113
111
|
return [coordinates[0], coordinates[1], 0];
|
|
114
112
|
}
|
|
@@ -95,33 +95,29 @@ var Grid3DModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
95
95
|
}, {
|
|
96
96
|
key: "registerBuiltinAttributes",
|
|
97
97
|
value: function registerBuiltinAttributes() {
|
|
98
|
-
// point layer size;
|
|
99
98
|
this.styleAttributeService.registerStyleAttribute({
|
|
100
99
|
name: 'size',
|
|
101
100
|
type: _l7Core.AttributeType.Attribute,
|
|
102
101
|
descriptor: {
|
|
103
102
|
name: 'a_Size',
|
|
104
103
|
buffer: {
|
|
105
|
-
// give the WebGL driver a hint that this buffer may change
|
|
106
104
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
107
105
|
data: [],
|
|
108
106
|
type: _l7Core.gl.FLOAT
|
|
109
107
|
},
|
|
110
108
|
size: 1,
|
|
111
|
-
update: function update(feature
|
|
109
|
+
update: function update(feature) {
|
|
112
110
|
var size = feature.size;
|
|
113
111
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
|
-
});
|
|
117
|
-
|
|
114
|
+
});
|
|
118
115
|
this.styleAttributeService.registerStyleAttribute({
|
|
119
116
|
name: 'normal',
|
|
120
117
|
type: _l7Core.AttributeType.Attribute,
|
|
121
118
|
descriptor: {
|
|
122
119
|
name: 'a_Normal',
|
|
123
120
|
buffer: {
|
|
124
|
-
// give the WebGL driver a hint that this buffer may change
|
|
125
121
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
126
122
|
data: [],
|
|
127
123
|
type: _l7Core.gl.FLOAT
|
|
@@ -139,16 +135,13 @@ var Grid3DModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
139
135
|
descriptor: {
|
|
140
136
|
name: 'a_Pos',
|
|
141
137
|
buffer: {
|
|
142
|
-
// give the WebGL driver a hint that this buffer may change
|
|
143
138
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
144
139
|
data: [],
|
|
145
140
|
type: _l7Core.gl.FLOAT
|
|
146
141
|
},
|
|
147
142
|
size: 3,
|
|
148
|
-
update: function update(feature
|
|
149
|
-
var coordinates = feature.version === 'GAODE2.x' ? feature.originCoordinates : feature.coordinates;
|
|
150
|
-
// const coordinates = feature.originCoordinates as number[];
|
|
151
|
-
|
|
143
|
+
update: function update(feature) {
|
|
144
|
+
var coordinates = feature.version === 'GAODE2.x' ? feature.originCoordinates : feature.coordinates;
|
|
152
145
|
return [coordinates[0], coordinates[1], 0];
|
|
153
146
|
}
|
|
154
147
|
}
|
|
@@ -174,18 +174,16 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
|
|
|
174
174
|
descriptor: {
|
|
175
175
|
name: 'a_Dir',
|
|
176
176
|
buffer: {
|
|
177
|
-
// give the WebGL driver a hint that this buffer may change
|
|
178
177
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
179
178
|
data: [],
|
|
180
179
|
type: _l7Core.gl.FLOAT
|
|
181
180
|
},
|
|
182
181
|
size: 2,
|
|
183
|
-
update: function update(feature, featureIdx, vertex
|
|
182
|
+
update: function update(feature, featureIdx, vertex) {
|
|
184
183
|
return [vertex[3], vertex[4]];
|
|
185
184
|
}
|
|
186
185
|
}
|
|
187
|
-
});
|
|
188
|
-
|
|
186
|
+
});
|
|
189
187
|
this.styleAttributeService.registerStyleAttribute({
|
|
190
188
|
name: 'size',
|
|
191
189
|
type: _l7Core.AttributeType.Attribute,
|
|
@@ -198,7 +196,7 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
|
|
|
198
196
|
type: _l7Core.gl.FLOAT
|
|
199
197
|
},
|
|
200
198
|
size: 1,
|
|
201
|
-
update: function update(feature
|
|
199
|
+
update: function update(feature) {
|
|
202
200
|
var _feature$size = feature.size,
|
|
203
201
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
204
202
|
return [size];
|
|
@@ -308,7 +306,6 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
|
|
|
308
306
|
enable: false
|
|
309
307
|
},
|
|
310
308
|
blend: this.getBlend(),
|
|
311
|
-
// count: 6,
|
|
312
309
|
elements: createElements({
|
|
313
310
|
data: [0, 2, 1, 2, 3, 1],
|
|
314
311
|
type: _l7Core.gl.UNSIGNED_INT,
|
|
@@ -102,17 +102,13 @@ var HexagonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
102
102
|
descriptor: {
|
|
103
103
|
name: 'a_Pos',
|
|
104
104
|
buffer: {
|
|
105
|
-
// give the WebGL driver a hint that this buffer may change
|
|
106
105
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
107
106
|
data: [],
|
|
108
107
|
type: _l7Core.gl.FLOAT
|
|
109
108
|
},
|
|
110
109
|
size: 3,
|
|
111
|
-
update: function update(feature
|
|
112
|
-
|
|
113
|
-
var coordinates = feature.version === 'GAODE2.x' ? feature.originCoordinates : feature.coordinates; // const coordinates = feature.coordinates as number[];
|
|
114
|
-
// const coordinates = feature.originCoordinates as number[];
|
|
115
|
-
|
|
110
|
+
update: function update(feature) {
|
|
111
|
+
var coordinates = feature.version === 'GAODE2.x' ? feature.originCoordinates : feature.coordinates;
|
|
116
112
|
return [coordinates[0], coordinates[1], 0];
|
|
117
113
|
}
|
|
118
114
|
}
|
package/lib/image/index.js
CHANGED
|
@@ -93,7 +93,8 @@ var ImageLayer = /*#__PURE__*/function (_BaseLayer) {
|
|
|
93
93
|
var type = this.getModelType();
|
|
94
94
|
var defaultConfig = {
|
|
95
95
|
image: {},
|
|
96
|
-
dataImage: {}
|
|
96
|
+
dataImage: {},
|
|
97
|
+
tileDataImage: {}
|
|
97
98
|
};
|
|
98
99
|
return defaultConfig[type];
|
|
99
100
|
}
|
|
@@ -109,6 +110,8 @@ var ImageLayer = /*#__PURE__*/function (_BaseLayer) {
|
|
|
109
110
|
return 'dataImage';
|
|
110
111
|
} else if (shape === 'image') {
|
|
111
112
|
return 'image';
|
|
113
|
+
} else if (shape === 'tileDataImage') {
|
|
114
|
+
return 'tileDataImage';
|
|
112
115
|
} else {
|
|
113
116
|
return 'image';
|
|
114
117
|
}
|