mirror of https://gitee.com/antv-l7/antv-l7
Shihui dev (#826)
* feat: 增加小程序环境判断、替换 regl -> l7regl * style: code style * feat(新增工程配置): 新增小程序工程配置 * feat: 支持小程序环境中传入 canvas 实例用于渲染、兼容 L7 原有代码 * style: code style * feat: 小程序不需要对 classList 操作(真机也没有 classList 属性) * style: code style * feat: 对 docStyle、devicePixelRatio 以及部分 dom 的兼容 * style: code style * feat: 小程序兼容 window.perframce.now requestAnimationFrame * feat: 新增工程配置 * feat: 新增工程配置 * feat: 兼容动画减弱以及部分的 dom 处理 * style: code style * feat: 替换 mapbox/tiny-sdf -> l7-tiny-sdf * style: code style * feat: 兼容操作 * style: code style * style: demo code * feat: change version * feat: mini code * feat: 小程序兼容 * feat: 合并mini-adapter * feat: 合并mini-adapter * feat: 新增tag * feat: 增加 imageData 兼容 * style: code style by lint * feat: 修改版本号 * feat: 新增mini6 beta版本 * feat: 去除原adapter * feat: 修改版本号 * feat: 升级版本 * feat: 修改版本引用 * style: code style * feat: 小程序兼容requestAnimationFrame * feat: 小程序兼容requestAnimationFrame * style: maps -> mini * feat: update mini version * feat: 修改 webgl 扩展名称的大小写、使之可以与 l7regl 配合,兼容小程序环境 * feat: 用适配的 requestAnimateFrame 替换 setInterval * feat: 修改 L7 - mini 版本、修改 adapter 中 screen、devicePixelRadio 关于 isMini 的取值 * feat: 修复小程序环境中 getMapTouches 的取值 * feat: 地图联动部分改造 * feat: 增加地图联动 * feat: 修复新增小程序地图联动 * feat: 增加小程序地图联动 * style: lint style * style: handle merge conflict * feat: 增加有无底图模式的参数控制、修复与小程序地图联动时的 bug * style: lint style * feat: 扩展小程序地图联动传递参数 * style: lint style * chore: update L7Mini version 2.5.8 - mini16 -> 2.5.8 - mini17 * feat: 增加小程序可视化交互注册监听时上下文绑定 * style: lint style * chore: update L7Mini version 2.5.8mini17 -> 2.5.8mini18 * chore: update L7Mini version 2.5.8mini18 -> 2.5.8mini19 * chore: update L7Mini version 2.5.8mini20 -> 2.5.8mini21 * feat: add performance demo * style: lint style * style: lint style * feat: add getModelMatrix into viewport * feat: 新增地球模式 (初步构建) * feat: 完善地球交互 * style: lint style * feat: 调整地球图层缩放的方向 * style: lint style * feat: 增加地球模式的 pointLayer/fill 图层 * style: lint style * feat: 增加地球、太阳的简单运动系统,优化部分代码结构 * fix: 修复时间点击出错 * style: lint style * fix: 修复地图 panBy 方法参数错误 * style: lint style * feat: pointLayer/cylinder 圆柱兼容地球模式 * style: lint style * feat: 修复 pointLayer/fill 在拾取是破面严重的情况 * style: lint style * feat: 增加 arc 弧度调节 * feat: 增加 lineLayer/arc3d 兼容地球模式 * style: lint style * feat: 增加地球图层 - 大气层 * style: lint style * feat: 增加设置可视化层背景色的能力 * style: lint style * feat: 增加地球外发光效果 * style: lint style * feat: 允许用户不使用 layer 的 source 方法 - 地球模式下光晕图层不需要传数据 * style: lint style * feat: 调整光晕的 shader 计算 * feat: 调整地球大气层的渲染层级 * style: lint style * feat: 调整案例 * style: lint style * feat: 增加地球图层的默认参数、调整部分代码 * style: lint style * feat: imageTile developinging * style: lint style * feat: 新增图片瓦片地图 * fix: 修复 amap2 新增样式导致的 marker 失效 * feat: 修复 amap2 的 amap-maps 新增 z-index=0; 引发的marker 显示层级失效 * feat: amap2 的 amap-maps 新增 z-index=0; 样式,让 marker 中 zIndex 失效 * style: lint style * feat: 补全瓦片地图中的类型引用 * style: lint style * feat: 取消 earthmap 的 hash 模块 * feat: 调整 L7Mini 版本 * feat: 合并图片瓦片图层 * feat: 增加 imageLayer 的对小程序的兼容 * style: lint style * feat: 修改小程序分支版本 * feat: 更新 l7regl 依赖(补充对支付宝小程序 image 对象的类型判断) * feat: 增加 demo * style: lint style * feat: 修复 varying 传递 float 总数在部分终端设备 ios13 上突破限制的问题 * feat: add stoty demo * style: lint style * feat: 调整 aspace demo * feat: 调整 aspace demo * style: lint style * feat: 调整 demo * feat: 补充依赖 * feat: 新增 arcmini layer,增加拖拽时的拾取优化(地图拖拽时取消拾取) * feat: 增加注释 * feat: 剔除地图拖拽时多余的 shader 计算 * style: lint style * feat: 暂时取消拖拽时 shader 的过滤处理 * style: lint style * feat: 合并 mi nimini * feat: add l7hammerjs * feat: 增加 l7hammerjs 声明 * feat: update version * feat: merge shihui_dev * feat: 去除多余依赖 * feat: 小程序合并 master 无报错版本 * feat: 修改 demo * style: lint style * feat: change l7hammerjs * feat: remove test hammerjs * chore: update verison and get enable branch 2.5.37-mini19 * chore: update version 2.5.37-mini19 -> 2.5.37-mini20 enabled * feat: 去除 hammerjs 的类型定义 - l7hammerjs * style: lint style * feat: 增加类型定义 @antv/l7-maps/lib/map/ * feat: 调整类型定义 * feat: 调整类型定义文件 * feat: change typing * feat: 增加图层渲染列表 layerList 更新图层渲染排序计算 去除夺取 renderTest * style: lint style * chore: update version 2.5.43 -> 2.5.44 * feat: 修复一些小程序合并/imageTile 的问题 * style: lint style * feat: 补全漏写的 updateLayerRenderList 排序 * feat: 完善站点构建 增加 @antv/l7-maps/lib/map 的引用 Co-authored-by: zhongwu <xingya.sxy@alibaba-inc.com>
This commit is contained in:
parent
5403147408
commit
d49116e0a1
22
beta.sh
22
beta.sh
|
@ -1,11 +1,11 @@
|
|||
npm dist-tag add @antv/l7-component@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-core@2.5.41 beta
|
||||
npm dist-tag add @antv/l7@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-layers@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-map@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-maps@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-renderer@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-scene@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-source@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-three@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-utils@2.5.41 beta
|
||||
npm dist-tag add @antv/l7-component@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-core@2.5.45 beta
|
||||
npm dist-tag add @antv/l7@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-layers@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-map@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-maps@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-renderer@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-scene@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-source@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-three@2.5.45 beta
|
||||
npm dist-tag add @antv/l7-utils@2.5.45 beta
|
||||
|
|
|
@ -6,6 +6,7 @@ window.geotiff = require('geotiff');
|
|||
window.g2 = require('@antv/g2');
|
||||
window.l7 = require('@antv/l7');
|
||||
window.l7Mini = require('@antv/l7-mini');
|
||||
window.l7MiniMap = require('@antv/l7-maps/lib/map');
|
||||
window.l7Maps = require('@antv/l7-maps');
|
||||
window.l7React = require('@antv/l7-react');
|
||||
window.l7Draw = require('@antv/l7-draw');
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"message": "chore: publish"
|
||||
}
|
||||
},
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-component",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -25,8 +25,8 @@
|
|||
"author": "lzxue",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"inversify": "^5.0.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-core",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -24,7 +24,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/async-hook": "^2.1.0",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"ajv": "^6.10.2",
|
||||
"element-resize-event": "^3.0.3",
|
||||
|
|
|
@ -166,7 +166,9 @@ export default class LayerService implements ILayerService {
|
|||
|
||||
private runRender() {
|
||||
this.renderLayers();
|
||||
this.layerRenderID = requestAnimationFrame(this.runRender.bind(this));
|
||||
this.layerRenderID = $window.requestAnimationFrame(
|
||||
this.runRender.bind(this),
|
||||
);
|
||||
}
|
||||
|
||||
private clear() {
|
||||
|
|
|
@ -325,6 +325,7 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
}
|
||||
|
||||
// 尝试初始化未初始化的图层
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
|
||||
// 组件需要等待layer 初始化完成之后添加
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -25,12 +25,12 @@
|
|||
"author": "antv",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@antv/l7-component": "^2.5.43",
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-layers": "^2.5.43",
|
||||
"@antv/l7-maps": "^2.5.43",
|
||||
"@antv/l7-scene": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-component": "2.5.45",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-layers": "2.5.45",
|
||||
"@antv/l7-maps": "2.5.45",
|
||||
"@antv/l7-scene": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7"
|
||||
},
|
||||
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
const version = '2.5.43';
|
||||
const version = '2.5.45';
|
||||
export { version };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-layers",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "L7's collection of built-in layers",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -24,9 +24,9 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/geo-coord": "^1.0.8",
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-source": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-source": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/martini": "^0.2.0",
|
||||
"@turf/meta": "^6.0.2",
|
||||
|
|
|
@ -1034,6 +1034,7 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
|||
|
||||
private reRender() {
|
||||
if (this.inited) {
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ export default class BaseEarthModel extends BaseModel {
|
|||
width: imageData[0].width,
|
||||
height: imageData[0].height,
|
||||
});
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
});
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ export default class ImageModel extends BaseModel {
|
|||
width: img.width,
|
||||
height: img.height,
|
||||
});
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
};
|
||||
} else {
|
||||
|
@ -61,6 +62,7 @@ export default class ImageModel extends BaseModel {
|
|||
width: imageData[0].width,
|
||||
height: imageData[0].height,
|
||||
});
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ export default class ImageTile {
|
|||
const east = lnglatBounds.getEast();
|
||||
const north = lnglatBounds.getNorth();
|
||||
|
||||
const imageLayer = new ImageLayer({});
|
||||
const imageLayer = new ImageLayer({ zIndex: -999 });
|
||||
imageLayer.source(
|
||||
// 'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',
|
||||
imageSrc,
|
||||
|
|
|
@ -268,6 +268,7 @@ export default class Tile {
|
|||
this.tileCache.setTile(tile, key);
|
||||
|
||||
this.pruneTiles();
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
} else {
|
||||
// Tip: show 方法就是将相应的瓦片图片添加到渲染队列
|
||||
|
@ -324,6 +325,7 @@ export default class Tile {
|
|||
|
||||
tile.imageLayer.emit('remove', null);
|
||||
tile.imageLayer.destroy();
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
|
||||
// 清除 tileCache 中的存储 相当于 tileCache.setTile(tile, null)
|
||||
|
@ -352,6 +354,7 @@ export default class Tile {
|
|||
});
|
||||
|
||||
this.layer.layerChildren = [];
|
||||
this.layerService.updateLayerRenderList();
|
||||
this.layerService.renderLayers();
|
||||
this.tileList = {};
|
||||
this.tileCache.destory();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-map",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "l7 map",
|
||||
"keywords": [],
|
||||
"author": "thinkinggis <lzx199065@gmail.com>",
|
||||
|
@ -37,7 +37,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/antvis/L7#readme",
|
||||
"dependencies": {
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/point-geometry": "^0.1.0",
|
||||
"@mapbox/unitbezier": "^0.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-maps",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -27,9 +27,9 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^0.0.3",
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-map": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-map": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@types/amap-js-api": "^1.4.6",
|
||||
"@types/mapbox-gl": "^1.11.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-mini",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -25,11 +25,11 @@
|
|||
"author": "antv",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-layers": "^2.5.43",
|
||||
"@antv/l7-maps": "^2.5.43",
|
||||
"@antv/l7-scene": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-layers": "2.5.45",
|
||||
"@antv/l7-maps": "2.5.45",
|
||||
"@antv/l7-scene": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7"
|
||||
},
|
||||
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @ts-ignore
|
||||
// tslint:disable-next-line:no-submodule-imports
|
||||
import Map from '@antv/l7-maps/lib/map/';
|
||||
import Map from '@antv/l7-maps/lib/map';
|
||||
export * from '@antv/l7-core';
|
||||
export * from '@antv/l7-scene';
|
||||
export * from '@antv/l7-layers';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-renderer",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -26,7 +26,7 @@
|
|||
"gl": "^4.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"l7regl": "^0.0.15",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-scene",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -23,12 +23,12 @@
|
|||
"author": "xiaoiver",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/l7-component": "^2.5.43",
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-layers": "^2.5.43",
|
||||
"@antv/l7-maps": "^2.5.43",
|
||||
"@antv/l7-renderer": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-component": "2.5.45",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-layers": "2.5.45",
|
||||
"@antv/l7-maps": "2.5.45",
|
||||
"@antv/l7-renderer": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"mapbox-gl": "^1.2.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-source",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -26,8 +26,8 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/async-hook": "^2.1.0",
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-utils": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-utils": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/geojson-rewind": "^0.4.0",
|
||||
"@turf/helpers": "^6.1.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-three",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "three for L7 ",
|
||||
"keywords": [
|
||||
"3D",
|
||||
|
@ -44,9 +44,9 @@
|
|||
},
|
||||
"homepage": "https://github.com/antvis/L7#readme",
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.43",
|
||||
"@antv/l7-layers": "^2.5.43",
|
||||
"@antv/l7-scene": "^2.5.43",
|
||||
"@antv/l7-core": "2.5.45",
|
||||
"@antv/l7-layers": "2.5.45",
|
||||
"@antv/l7-scene": "2.5.45",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-utils",
|
||||
"version": "2.5.43",
|
||||
"version": "2.5.45",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { PointLayer, Scene } from '@antv/l7';
|
||||
import { GaodeMapV2 } from '@antv/l7-maps';
|
||||
import { GaodeMapV2, GaodeMap, Mapbox } from '@antv/l7-maps';
|
||||
import * as React from 'react';
|
||||
export default class Amap2demo_destroy extends React.Component {
|
||||
// @ts-ignore
|
||||
|
@ -12,7 +12,7 @@ export default class Amap2demo_destroy extends React.Component {
|
|||
public async componentDidMount() {
|
||||
const scene = new Scene({
|
||||
id: 'map',
|
||||
map: new GaodeMapV2({
|
||||
map: new Mapbox({
|
||||
center: [121.107846, 30.267069],
|
||||
pitch: 0,
|
||||
style: 'normal',
|
||||
|
@ -77,6 +77,9 @@ export default class Amap2demo_destroy extends React.Component {
|
|||
.active(true);
|
||||
scene.addLayer(layer);
|
||||
});
|
||||
// setTimeout(() => {
|
||||
// this.scene.destroy()
|
||||
// }, 2000)
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
|
@ -40,7 +40,7 @@ export default class Amap2demo_imageTileLayer extends React.Component {
|
|||
];
|
||||
|
||||
scene.on('loaded', () => {
|
||||
const layer = new ImageTileLayer({});
|
||||
const layer = new ImageTileLayer();
|
||||
layer
|
||||
.source(
|
||||
'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"@antv/l7-component": ["packages/component/src"],
|
||||
"@antv/l7-layers": ["packages/layers/src"],
|
||||
"@antv/l7-map": ["packages/map/src"],
|
||||
"@antv/l7-maps/lib/map": ["packages/maps/src/map"],
|
||||
"@antv/l7-maps": ["packages/maps/src"],
|
||||
"@antv/l7-scene": ["packages/scene/src"],
|
||||
"@antv/l7-renderer": ["packages/renderer/src"],
|
||||
|
|
Loading…
Reference in New Issue