diff --git a/build/rollup.config.js b/build/rollup.config.js index 439e7fa187..2a1cafc621 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -18,7 +18,7 @@ module.exports = [ { input: resolveFile('build/bundle.ts'), output: { - file: resolveFile('packages/l7/dist/bundle.js'), + file: resolveFile('packages/l7/dist/l7.js'), format: 'umd', name: 'L7', globals: { diff --git a/docs/api/quickstart.en.md b/docs/api/quickstart.en.md index 8f134112c9..4421934bd3 100644 --- a/docs/api/quickstart.en.md +++ b/docs/api/quickstart.en.md @@ -13,8 +13,7 @@ L7 提供三种使用方式:CDN、Submodule 以及 React 组件。 首先在 `
` 中引入 L7 CDN 版本的 JS 和 CSS 文件: ```html - - + ``` @@ -35,7 +34,7 @@ L7 提供三种使用方式:CDN、Submodule 以及 React 组件。 ## 通过 Submodule 使用 -首先通过 `npm/yarn` 安装 `@l7/scene` 和 `@l7/layers`: +首先通过 `npm/yarn` 安装 `@antv/l7` 和 `@l7/layers`: ```bash npm install --save @l7/scene @l7/layers // or diff --git a/examples/point/chart/demo/bar.js b/examples/point/chart/demo/bar.js index 6500ef294c..cbbe427c05 100644 --- a/examples/point/chart/demo/bar.js +++ b/examples/point/chart/demo/bar.js @@ -8,7 +8,7 @@ const scene = new Scene({ pitch: 0, zoom: 4.19 }); - +scene.render(); scene.on('loaded', () => { addChart(); }); diff --git a/examples/point/chart/demo/chart.js b/examples/point/chart/demo/chart.js index ff538f3ab2..e6d3521b23 100644 --- a/examples/point/chart/demo/chart.js +++ b/examples/point/chart/demo/chart.js @@ -8,11 +8,10 @@ const scene = new Scene({ pitch: 0, zoom: 4.19 }); - +scene.render(); scene.on('loaded', () => { addChart(); }); -window.mapScene = scene; function addChart() { fetch( 'https://gw.alipayobjects.com/os/basement_prod/0b96cca4-7e83-449a-93d0-2a77053e74ab.json' diff --git a/examples/point/chart/demo/ring.js b/examples/point/chart/demo/ring.js index 251d4fd6db..54363a5d5d 100644 --- a/examples/point/chart/demo/ring.js +++ b/examples/point/chart/demo/ring.js @@ -42,7 +42,7 @@ const scene = new Scene({ center: [ 52.21496184144132, 24.121126851768906 ], zoom: 3.802 }); -window.mapScene = scene; +scene.render(); scene.on('loaded', () => { Promise.all([ fetch( diff --git a/examples/point/marker/demo/marker.js b/examples/point/marker/demo/marker.js index bb7930bf8e..be35cfe81f 100644 --- a/examples/point/marker/demo/marker.js +++ b/examples/point/marker/demo/marker.js @@ -7,6 +7,7 @@ const scene = new Scene({ pitch: 0, zoom: 4 }); +scene.render(); scene.on('loaded', () => { addMarkers(); }); diff --git a/gatsby-browser.js b/gatsby-browser.js index 6eee86f17a..6ffe27f471 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -7,4 +7,3 @@ window.layers = require('./packages/layers/src'); window.component = require('./packages/component/src'); window.g2 = require('@antv/g2'); window.l7 = require("@antv/l7"); -// diff --git a/gatsby-node.js b/gatsby-node.js index 6c3b894361..0b55fb99ba 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -11,6 +11,7 @@ exports.onCreateWebpackConfig = ({ getConfig }) => { '@l7/renderer': path.resolve(__dirname, 'packages/renderer/src'), '@l7/scene': path.resolve(__dirname, 'packages/scene/src'), '@l7/source': path.resolve(__dirname, 'packages/source/src'), - '@l7/utils': path.resolve(__dirname, 'packages/utils/src') + '@l7/utils': path.resolve(__dirname, 'packages/utils/src'), + '@antv/l7': path.resolve(__dirname, 'packages/l7/src') }; }; diff --git a/packages/l7/package.json b/packages/l7/package.json index cdc4b1a794..518655f4d3 100644 --- a/packages/l7/package.json +++ b/packages/l7/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A Large-scale WebGL-powered Geospatial Data Visualization", "main": "dist/bundle.js", "sideEffects": true, diff --git a/packages/l7/src/index.ts b/packages/l7/src/index.ts new file mode 100644 index 0000000000..85e6e66668 --- /dev/null +++ b/packages/l7/src/index.ts @@ -0,0 +1,7 @@ +export * from '@l7/core'; +// @ts-ignore +export * from '@l7/scene'; +// @ts-ignore +export * from '@l7/layers'; +// @ts-ignore +export * from '@l7/component'; \ No newline at end of file diff --git a/site/pages/index.zh.tsx b/site/pages/index.zh.tsx index 4588726a7a..dedf6b0447 100644 --- a/site/pages/index.zh.tsx +++ b/site/pages/index.zh.tsx @@ -105,10 +105,13 @@ const IndexPage = () => { notifications={notifications} className="banner" githubStarLink="https://github.com/antvis/L7/stargazers" - />