mirror of https://gitee.com/antv-l7/antv-l7
chore: babel useBuiltIns useage
This commit is contained in:
parent
4d3afba06b
commit
aa3589675d
|
@ -44,9 +44,14 @@ module.exports = api => {
|
|||
{
|
||||
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
|
||||
useBuiltIns: 'usage',
|
||||
corejs: '3.0.0',
|
||||
// set `modules: false` when building CDN bundle, let rollup do commonjs works
|
||||
// @see https://github.com/rollup/rollup-plugin-babel#modules
|
||||
modules: (isCDNBundle || isESModule) ? false : 'auto'
|
||||
modules: (isCDNBundle || isESModule) ? false : 'auto',
|
||||
targets: {
|
||||
chrome: 58,
|
||||
ie: 11
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@ -57,10 +62,12 @@ module.exports = api => {
|
|||
],
|
||||
'@babel/preset-typescript'
|
||||
],
|
||||
ignore: [ /[\/\\]core-js/, /@babel[\/\\]runtime/ ],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator',
|
||||
'@babel/plugin-syntax-async-generators',
|
||||
[
|
||||
'@babel/plugin-proposal-decorators',
|
||||
{
|
||||
|
|
|
@ -5,5 +5,4 @@ order: 7
|
|||
可自定义点符号,通过自定义dom实现地图标注,富文本、动态点状符号都可用于地图上信息的标记。
|
||||
|
||||
## 使用
|
||||
|
||||
[Marker 文档](../../component)
|
||||
|
|
|
@ -25,9 +25,8 @@ addImage()
|
|||
'https://gw.alipayobjects.com/zos/basement_prod/604b5e7f-309e-40db-b95b-4fac746c5153.svg'
|
||||
);
|
||||
|
||||
⚠️ 符号图的ID不能与点图层已有shape名称相同,比如不能设置 circle
|
||||
|
||||
```
|
||||
⚠️ 符号图的ID不能与点图层已有shape名称相同,比如不能设置 circle
|
||||
|
||||
符号图需要把shape设置成图片的id,同样符号图shape也支持数据映射
|
||||
|
||||
|
|
|
@ -42,12 +42,12 @@ const scene = new Scene({
|
|||
id: 'map',
|
||||
map: new Mapbox({
|
||||
style: 'dark',
|
||||
center: [ 103.83735604457024, 1.360253881403068 ],
|
||||
center: [103.83735604457024, 1.360253881403068],
|
||||
pitch: 4.00000000000001,
|
||||
zoom: 10.210275860702593,
|
||||
rotation: 19.313180925794313
|
||||
token:'xxxx - token'
|
||||
})
|
||||
rotation: 19.313180925794313,
|
||||
token: 'xxxx - token',
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -42,12 +42,12 @@ const scene = new Scene({
|
|||
id: 'map',
|
||||
map: new Mapbox({
|
||||
style: 'dark',
|
||||
center: [ 103.83735604457024, 1.360253881403068 ],
|
||||
center: [103.83735604457024, 1.360253881403068],
|
||||
pitch: 4.00000000000001,
|
||||
zoom: 10.210275860702593,
|
||||
rotation: 19.313180925794313
|
||||
token:'xxxx - token'
|
||||
})
|
||||
rotation: 19.313180925794313,
|
||||
token: 'xxxx - token',
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ order: 2
|
|||
|
||||
L7 在地图样式层面增加了无底图样式```blank``` 无底图模式
|
||||
|
||||
😃不需要使用mapbox token 拿来就用,不要注册mapbox账户
|
||||
不需要使用mapbox token 也不需要注册mapbox账户
|
||||
|
||||
```javascript
|
||||
const scene = new Scene({
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Data Source https://busrouter.sg/visualization/
|
||||
|
||||
import { Scene, LineLayer } from '@antv/l7';
|
||||
import { Mapbox } from '@antv/l7-maps';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Data Source https://busrouter.sg/visualization/
|
||||
|
||||
import { Scene, LineLayer } from '@antv/l7';
|
||||
import { Mapbox } from '@antv/l7-maps';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Data Source https://busrouter.sg/visualization/
|
||||
|
||||
import { Scene, LineLayer } from '@antv/l7';
|
||||
import { Mapbox } from '@antv/l7-maps';
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
|
||||
"@babel/plugin-syntax-async-generators": "^7.7.4",
|
||||
"@babel/plugin-transform-runtime": "^7.7.6",
|
||||
"@babel/preset-env": "^7.5.5",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/preset-typescript": "^7.3.3",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"dependencies": {
|
||||
"@antv/l7-core": "^2.0.0-beta.21",
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@turf/distance": "^6.0.1",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"inversify": "^5.0.1",
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/tiny-sdf": "^1.1.1",
|
||||
"ajv": "^6.10.2",
|
||||
"element-resize-event": "^3.0.3",
|
||||
|
|
|
@ -60,7 +60,7 @@ const defaultLayerConfig: Partial<ILayerConfig> = {
|
|||
enableSelect: false,
|
||||
highlightColor: 'red',
|
||||
selectColor: 'blue',
|
||||
enableTAA: true,
|
||||
enableTAA: false,
|
||||
jitterScale: 1,
|
||||
enableLighting: false,
|
||||
};
|
||||
|
|
|
@ -25,9 +25,11 @@
|
|||
"@antv/l7-core": "^2.0.0-beta.21",
|
||||
"@antv/l7-source": "^2.0.0-beta.21",
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/martini": "^0.1.0",
|
||||
"@turf/meta": "^6.0.2",
|
||||
"@types/d3-color": "^1.2.2",
|
||||
"core-js": "3",
|
||||
"d3-array": "^2.3.1",
|
||||
"d3-color": "^1.4.0",
|
||||
"d3-scale": "^3.1.0",
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"dependencies": {
|
||||
"@antv/l7-core": "^2.0.0-beta.21",
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"gl-matrix": "^3.1.0",
|
||||
"inversify": "^5.0.1",
|
||||
"mapbox-gl": "^1.2.1",
|
||||
|
|
|
@ -232,7 +232,6 @@ export default class AMapService
|
|||
...rest
|
||||
} = this.config;
|
||||
// 高德地图创建独立的container;
|
||||
|
||||
// tslint:disable-next-line:typedef
|
||||
await new Promise((resolve) => {
|
||||
const resolveMap = () => {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"inversify-logging": "^0.2.1",
|
||||
"lodash": "^4.17.15",
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"@antv/l7-maps": "^2.0.0-beta.21",
|
||||
"@antv/l7-renderer": "^2.0.0-beta.21",
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"inversify-inject-decorators": "^3.1.0",
|
||||
"mapbox-gl": "^1.2.1",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"dependencies": {
|
||||
"@antv/l7-core": "^2.0.0-beta.21",
|
||||
"@antv/l7-utils": "^2.0.0-beta.21",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/geojson-rewind": "^0.4.0",
|
||||
"@turf/helpers": "^6.1.4",
|
||||
"@turf/invariant": "^6.1.2",
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"author": "lzxue",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@turf/helpers": "^6.1.4",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"gl-matrix": "^3.1.0",
|
||||
|
|
|
@ -19,11 +19,12 @@ export default class Point3D extends React.Component {
|
|||
|
||||
const scene = new Scene({
|
||||
id: 'map',
|
||||
map: new Mapbox({
|
||||
map: new GaodeMap({
|
||||
center: [120.19382669582967, 30.258134],
|
||||
pitch: 0,
|
||||
style: 'dark',
|
||||
zoom: 3,
|
||||
token: 'test',
|
||||
}),
|
||||
});
|
||||
scene.on('loaded', () => {
|
||||
|
|
11
yarn.lock
11
yarn.lock
|
@ -649,8 +649,8 @@
|
|||
|
||||
"@babel/plugin-syntax-async-generators@^7.2.0", "@babel/plugin-syntax-async-generators@^7.7.4":
|
||||
version "7.7.4"
|
||||
resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz#331aaf310a10c80c44a66b238b6e49132bd3c889"
|
||||
integrity sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g==
|
||||
resolved "https://registry.npm.alibaba-inc.com/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.7.4.tgz#331aaf310a10c80c44a66b238b6e49132bd3c889"
|
||||
integrity sha1-MxqvMQoQyAxEpmsji25JEyvTyIk=
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
|
||||
|
@ -1295,6 +1295,13 @@
|
|||
dependencies:
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/runtime@^7.7.7":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.npm.alibaba-inc.com/@babel/runtime/download/@babel/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf"
|
||||
integrity sha1-GUdpyo1td5DsI2Ba+e4+QqCqec8=
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/standalone@^7.6.4":
|
||||
version "7.7.4"
|
||||
resolved "https://registry.npmjs.org/@babel/standalone/-/standalone-7.7.4.tgz#9adcda4b7c33627c65eacf87f5c1f950987294c2"
|
||||
|
|
Loading…
Reference in New Issue