mirror of https://gitee.com/antv-l7/antv-l7
fix(maker): marker demo
This commit is contained in:
parent
eb290bdc01
commit
0069b387be
|
@ -18,7 +18,7 @@ module.exports = [
|
||||||
{
|
{
|
||||||
input: resolveFile('build/bundle.ts'),
|
input: resolveFile('build/bundle.ts'),
|
||||||
output: {
|
output: {
|
||||||
file: resolveFile('packages/l7/dist/bundle.js'),
|
file: resolveFile('packages/l7/dist/l7.js'),
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
name: 'L7',
|
name: 'L7',
|
||||||
globals: {
|
globals: {
|
||||||
|
|
|
@ -13,8 +13,7 @@ L7 提供三种使用方式:CDN、Submodule 以及 React 组件。
|
||||||
首先在 `<head>` 中引入 L7 CDN 版本的 JS 和 CSS 文件:
|
首先在 `<head>` 中引入 L7 CDN 版本的 JS 和 CSS 文件:
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
<script src='https://api.l7/v2.0.0-beta/l7.js'></script>
|
<script src='https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.5/dist/l7.js'></script>
|
||||||
<link href='https://api.l7/v2.0.0-beta/l7.css' rel='stylesheet' />
|
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -35,7 +34,7 @@ L7 提供三种使用方式:CDN、Submodule 以及 React 组件。
|
||||||
|
|
||||||
## 通过 Submodule 使用
|
## 通过 Submodule 使用
|
||||||
|
|
||||||
首先通过 `npm/yarn` 安装 `@l7/scene` 和 `@l7/layers`:
|
首先通过 `npm/yarn` 安装 `@antv/l7` 和 `@l7/layers`:
|
||||||
```bash
|
```bash
|
||||||
npm install --save @l7/scene @l7/layers
|
npm install --save @l7/scene @l7/layers
|
||||||
// or
|
// or
|
||||||
|
|
|
@ -8,7 +8,7 @@ const scene = new Scene({
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
zoom: 4.19
|
zoom: 4.19
|
||||||
});
|
});
|
||||||
|
scene.render();
|
||||||
scene.on('loaded', () => {
|
scene.on('loaded', () => {
|
||||||
addChart();
|
addChart();
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,11 +8,10 @@ const scene = new Scene({
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
zoom: 4.19
|
zoom: 4.19
|
||||||
});
|
});
|
||||||
|
scene.render();
|
||||||
scene.on('loaded', () => {
|
scene.on('loaded', () => {
|
||||||
addChart();
|
addChart();
|
||||||
});
|
});
|
||||||
window.mapScene = scene;
|
|
||||||
function addChart() {
|
function addChart() {
|
||||||
fetch(
|
fetch(
|
||||||
'https://gw.alipayobjects.com/os/basement_prod/0b96cca4-7e83-449a-93d0-2a77053e74ab.json'
|
'https://gw.alipayobjects.com/os/basement_prod/0b96cca4-7e83-449a-93d0-2a77053e74ab.json'
|
||||||
|
|
|
@ -42,7 +42,7 @@ const scene = new Scene({
|
||||||
center: [ 52.21496184144132, 24.121126851768906 ],
|
center: [ 52.21496184144132, 24.121126851768906 ],
|
||||||
zoom: 3.802
|
zoom: 3.802
|
||||||
});
|
});
|
||||||
window.mapScene = scene;
|
scene.render();
|
||||||
scene.on('loaded', () => {
|
scene.on('loaded', () => {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
fetch(
|
fetch(
|
||||||
|
|
|
@ -7,6 +7,7 @@ const scene = new Scene({
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
zoom: 4
|
zoom: 4
|
||||||
});
|
});
|
||||||
|
scene.render();
|
||||||
scene.on('loaded', () => {
|
scene.on('loaded', () => {
|
||||||
addMarkers();
|
addMarkers();
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,4 +7,3 @@ window.layers = require('./packages/layers/src');
|
||||||
window.component = require('./packages/component/src');
|
window.component = require('./packages/component/src');
|
||||||
window.g2 = require('@antv/g2');
|
window.g2 = require('@antv/g2');
|
||||||
window.l7 = require("@antv/l7");
|
window.l7 = require("@antv/l7");
|
||||||
//
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ exports.onCreateWebpackConfig = ({ getConfig }) => {
|
||||||
'@l7/renderer': path.resolve(__dirname, 'packages/renderer/src'),
|
'@l7/renderer': path.resolve(__dirname, 'packages/renderer/src'),
|
||||||
'@l7/scene': path.resolve(__dirname, 'packages/scene/src'),
|
'@l7/scene': path.resolve(__dirname, 'packages/scene/src'),
|
||||||
'@l7/source': path.resolve(__dirname, 'packages/source/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')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7",
|
"name": "@antv/l7",
|
||||||
"version": "2.0.0-beta.4",
|
"version": "2.0.0-beta.5",
|
||||||
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
||||||
"main": "dist/bundle.js",
|
"main": "dist/bundle.js",
|
||||||
"sideEffects": true,
|
"sideEffects": true,
|
||||||
|
|
|
@ -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';
|
|
@ -105,10 +105,13 @@ const IndexPage = () => {
|
||||||
notifications={notifications}
|
notifications={notifications}
|
||||||
className="banner"
|
className="banner"
|
||||||
githubStarLink="https://github.com/antvis/L7/stargazers"
|
githubStarLink="https://github.com/antvis/L7/stargazers"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<Features features={features} style={{ width: '100%' }} />
|
<Features features={features} style={{ width: '100%' }} />
|
||||||
<Cases cases={cases} />
|
<Cases style={{ width: '102%' }} cases={cases} />
|
||||||
|
<Companies
|
||||||
|
title={t('感谢信赖')}
|
||||||
|
companies={companies}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue