fix(rebase):conflict

This commit is contained in:
thinkinggis 2019-11-14 20:11:59 +08:00
parent 8a09ae24be
commit 4eb8400c44
22 changed files with 320 additions and 104 deletions

View File

@ -8,6 +8,65 @@ const scene = new Scene({
type: 'mapbox',
zoom: 3.69,
});
const colorObj = {
redyellow: [
'#8A191A', '#AE3235',
'#CC464B', '#E26A5D',
'#EC8765', '#F0A66C',
'#F4BC8F', '#FFCEA7',
'#FFE4CE', '#FFF2E8'
],
yellow: [
'#7B320A', '#B35B21',
'#D2722E', '#F0883A',
'#FBA045', '#FAB04B',
'#FAC760', '#FBD78C',
'#FCE6B3', '#FCF3DB'
],
blue_green: [
'#094D4A', '#146968',
'#1D7F7E', '#289899',
'#34B6B7', '#4AC5AF',
'#5FD3A6', '#7BE39E',
'#A1EDB8', '#CEF8D6'
],
blue: [
'#0A3663', '#1558AC',
'#3771D9', '#4D89E5',
'#64A5D3', '#72BED6',
'#83CED6', '#A6E1E0',
'#B8EFE2', '#D7F9F0'
],
purple: [
'#312B60', '#4A457E',
'#615C99', '#816CAD',
'#A67FB5', '#C997C7',
'#DEB8D4', '#F5D4E6',
'#FAE4F1', '#FFF3FC'
],
color1: [
'#E4682F', '#FF8752',
'#FFA783', '#FFBEA8',
'#FFDCD6', '#EEF3FF',
'#C8D7F5', '#A5C1FC',
'#7FA7F9', '#5F8AE5'
],
color2: [
'#F1646A', '#F48789',
'#F7A9AC', '#FBCCCD',
'#FDEEEE', '#EEF3FF',
'#C8DAFE', '#A5C1FC',
'#80A8FB', '#5B8EF8'
],
color3: [
'#EEF3FF', '#C8DAFE',
'#A5C1FC', '#80A8FB',
'#5B8EF8', '#FCF6FA',
'#F5E4EF', '#F7CDDF',
'#ED9CBE', '#D1749B'
],
color4: [ '#F7B74A', '#FF4818', '#FFF598', '#F27DEB', '#8C1EB2', '#421EB2' ]
}
fetch('https://gw.alipayobjects.com/os/basement_prod/d3564b06-670f-46ea-8edb-842f7010a7c6.json')
.then((res) => res.json())
@ -21,7 +80,7 @@ fetch('https://gw.alipayobjects.com/os/basement_prod/d3564b06-670f-46ea-8edb-842
radius: 20,
opacity: 1.0,
rampColors: {
colors: ['#2E8AE6', '#69D1AB', '#DAF291', '#FFD591', '#FF7A45', '#CF1D49'],
colors: colorObj.redyellow.slice(0,6),
positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0]
}
})

View File

@ -8,6 +8,65 @@ const scene = new Scene({
type: 'mapbox',
zoom: 3,
});
window.mapScene = scene;
const colorObj = {
redyellow: [
'#8A191A', '#AE3235',
'#CC464B', '#E26A5D',
'#EC8765', '#F0A66C',
'#F4BC8F', '#FFCEA7',
'#FFE4CE', '#FFF2E8'
],
yellow: [
'#7B320A', '#B35B21',
'#D2722E', '#F0883A',
'#FBA045', '#FAB04B',
'#FAC760', '#FBD78C',
'#FCE6B3', '#FCF3DB'
],
blue_green: [
'#094D4A', '#146968',
'#1D7F7E', '#289899',
'#34B6B7', '#4AC5AF',
'#5FD3A6', '#7BE39E',
'#A1EDB8', '#CEF8D6'
],
blue: [
'#0A3663', '#1558AC',
'#3771D9', '#4D89E5',
'#64A5D3', '#72BED6',
'#83CED6', '#A6E1E0',
'#B8EFE2', '#D7F9F0'
],
purple: [
'#312B60', '#4A457E',
'#615C99', '#816CAD',
'#A67FB5', '#C997C7',
'#DEB8D4', '#F5D4E6',
'#FAE4F1', '#FFF3FC'
],
color1: [
'#E4682F', '#FF8752',
'#FFA783', '#FFBEA8',
'#FFDCD6', '#EEF3FF',
'#C8D7F5', '#A5C1FC',
'#7FA7F9', '#5F8AE5'
],
color2: [
'#F1646A', '#F48789',
'#F7A9AC', '#FBCCCD',
'#FDEEEE', '#EEF3FF',
'#C8DAFE', '#A5C1FC',
'#80A8FB', '#5B8EF8'
],
color3: [
'#EEF3FF', '#C8DAFE',
'#A5C1FC', '#80A8FB',
'#5B8EF8', '#FCF6FA',
'#F5E4EF', '#F7CDDF',
'#ED9CBE', '#D1749B'
]
}
fetch('https://gw.alipayobjects.com/os/basement_prod/337ddbb7-aa3f-4679-ab60-d64359241955.json')
.then((res) => res.json())
@ -24,14 +83,7 @@ fetch('https://gw.alipayobjects.com/os/basement_prod/337ddbb7-aa3f-4679-ab60-d64
radius: 5,
opacity: 1.0,
rampColors: {
colors: [
'#2E8AE6',
'#69D1AB',
'#DAF291',
'#FFD591',
'#FF7A45',
'#CF1D49',
],
colors: colorObj.blue_green.slice(0,6),
positions: [0,0.2, 0.4, 0.6, 0.8, 1.0],
},
});

View File

@ -1,39 +0,0 @@
import { Scene } from '@l7/scene';
import { LineLayer } from '@l7/layers'
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'light',
center: [102.602992, 23.107329],
zoom: 13,
});
fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json')
.then((res) => res.json())
.then((data) => {
const layer =
new LineLayer({
})
.source(data)
.size(1)
.shape('line')
.color(
'ELEV',
[
'#E8FCFF',
'#CFF6FF',
'#A1E9ff',
'#65CEF7',
'#3CB1F0',
'#2894E0',
'#1772c2',
'#105CB3',
'#0D408C',
'#002466',
].reverse(),
)
scene.addLayer(layer);
console.log(layer);
});

View File

@ -1,13 +0,0 @@
{
"title": {
"zh": "图库",
"en": "Gallery"
},
"demos": [
{
"filename": "line.js",
"title": "线图层",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ"
}
]
}

View File

@ -1,4 +0,0 @@
---
title: 标注
order: 0
---

View File

@ -11,7 +11,7 @@
},
{
"filename": "fill.js",
"title": "北京房价填充图",
"title": "分类填充图",
"screenshot": ""
}
]

View File

@ -1,9 +0,0 @@
import { Scene } from './node_modules/@l7/scene';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'dark',
center: [121.40, 31.258134],
zoom: 5,
});

View File

@ -10,7 +10,9 @@ const scene = new Scene({
});
const zoomControl = new Zoom();
const scaleControl = new Scale();
const scaleControl = new Scale({
position:'rightbottom',
});
scene.addControl(zoomControl);
scene.addControl(scaleControl);

View File

@ -1,6 +1,6 @@
---
title: 组件
order: 0
order: 2
---

View File

@ -1,4 +1,4 @@
---
title: 数据
order: 0
order: 1
---

View File

@ -89,22 +89,6 @@ module.exports = {
en: 'Gallery',
},
},
{
slug: 'data',
icon: 'data',
title: {
zh: '数据源',
en: 'data',
},
},
{
slug: 'scene',
icon: 'map',
title: {
zh: '场景',
en: 'Scene',
},
},
{
slug: 'point',
icon: 'point',
@ -147,19 +131,17 @@ module.exports = {
},
},
{
slug: 'marker',
icon: 'mapmarker',
slug: 'tutorial',
icon: 'map',
title: {
zh: '标注',
en: 'Marker',
zh: '教程示例',
en: 'tutorial',
},
}
},
],
exampleContainer: '<div style="min-height: 500px; justify-content: center;position: relative" id="map"/>',
playground: {
container: '<div style="min-height: 500px; justify-content: center;position: relative" id="map"/>',
playgroundDidMount: 'console.log("playgroundDidMount");',
playgroundWillUnmount: 'console.log("scene");',
},
},

View File

@ -17,6 +17,7 @@ export default class LayerService implements ILayerService {
public add(layer: ILayer) {
this.layers.push(layer);
layer.init();
}
public initLayers() {

191
yarn.lock
View File

@ -30,6 +30,112 @@
resolved "https://registry.npm.taobao.org/@ant-design/icons/download/@ant-design/icons-2.1.1.tgz#7b9c08dffd4f5d41db667d9dbe5e0107d0bd9a4a"
integrity sha1-e5wI3/1PXUHbZn2dvl4BB9C9mko=
"@antv/adjust@~0.2.0":
version "0.2.1"
resolved "https://registry.npm.taobao.org/@antv/adjust/download/@antv/adjust-0.2.1.tgz#cd350514e2f487702f05250724b554c1054687f4"
integrity sha1-zTUFFOL0h3AvBSUHJLVUwQVGh/Q=
dependencies:
"@antv/util" "~2.0.0"
tslib "^1.10.0"
"@antv/attr@~0.2.0":
version "0.2.0"
resolved "https://registry.npm.taobao.org/@antv/attr/download/@antv/attr-0.2.0.tgz#e9d786949e364936f91c3c19471d3162c73c10e0"
integrity sha1-6deGlJ42STb5HDwZRx0xYsc8EOA=
dependencies:
"@antv/util" "~2.0.0"
tslib "^1.10.0"
"@antv/component@~0.4.0-beta.2", "@antv/component@~0.4.0-beta.3":
version "0.4.0-beta.3"
resolved "https://registry.npm.taobao.org/@antv/component/download/@antv/component-0.4.0-beta.3.tgz?cache=0&sync_timestamp=1573701055549&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40antv%2Fcomponent%2Fdownload%2F%40antv%2Fcomponent-0.4.0-beta.3.tgz#2a1fb9fed8cc3b40f1828c98d43cc5e590a8ea1e"
integrity sha1-Kh+5/tjMO0DxgoyY1DzF5ZCo6h4=
dependencies:
"@antv/attr" "~0.2.0"
"@antv/dom-util" "^2.0.1"
"@antv/event-emitter" "~0.1.0"
"@antv/g" "~3.5.0-beta.1"
"@antv/matrix-util" "^2.0.2"
"@antv/path-util" "^2.0.3"
"@antv/scale" "~0.2.0"
"@antv/util" "~2.0.4"
"@antv/coord@~0.2.1", "@antv/coord@~0.2.2":
version "0.2.2"
resolved "https://registry.npm.taobao.org/@antv/coord/download/@antv/coord-0.2.2.tgz#8c4a1fd0959673ecccaf5bbf53c574a1c8cdbb3e"
integrity sha1-jEof0JWWc+zMr1u/U8V0ocjNuz4=
dependencies:
"@antv/matrix-util" "~2.0.1-beta.1"
"@antv/util" "~2.0.3"
tslib "^1.10.0"
"@antv/dom-util@^2.0.1", "@antv/dom-util@~2.0.1":
version "2.0.1"
resolved "https://registry.npm.taobao.org/@antv/dom-util/download/@antv/dom-util-2.0.1.tgz#45cf6deaa3726c60fe4340e6df3fe9f0c5fd72ea"
integrity sha1-Rc9t6qNybGD+Q0Dm3z/p8MX9cuo=
"@antv/event-emitter@^0.1.0", "@antv/event-emitter@^0.1.1", "@antv/event-emitter@~0.1.0":
version "0.1.1"
resolved "https://registry.npm.taobao.org/@antv/event-emitter/download/@antv/event-emitter-0.1.1.tgz#5e6cae4206af0e37eb2431fc3cd9416f8d8cd06c"
integrity sha1-XmyuQgavDjfrJDH8PNlBb42M0Gw=
"@antv/g-gesture@~0.1.0-beta.2":
version "0.1.0-beta.2"
resolved "https://registry.npm.taobao.org/@antv/g-gesture/download/@antv/g-gesture-0.1.0-beta.2.tgz#fdf7fa7455052b4211db22adc5595dfbe908804c"
integrity sha1-/ff6dFUFK0IR2yKtxVld++kIgEw=
dependencies:
"@antv/event-emitter" "~0.1.0"
d3-ease "^1.0.5"
"@antv/g2@~3.6.0-beta.4":
version "3.6.0-beta.4"
resolved "https://registry.npm.taobao.org/@antv/g2/download/@antv/g2-3.6.0-beta.4.tgz?cache=0&sync_timestamp=1571712117197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40antv%2Fg2%2Fdownload%2F%40antv%2Fg2-3.6.0-beta.4.tgz#0ea4d6466a802ceffc95e087f52bfdcc5ff4a5c8"
integrity sha1-DqTWRmqALO/8leCH9Sv9zF/0pcg=
dependencies:
"@antv/adjust" "~0.2.0"
"@antv/attr" "~0.2.0"
"@antv/component" "~0.4.0-beta.2"
"@antv/coord" "~0.2.1"
"@antv/dom-util" "^2.0.1"
"@antv/event-emitter" "~0.1.0"
"@antv/g" "~3.5.0-beta.1"
"@antv/matrix-util" "^2.0.2"
"@antv/path-util" "^2.0.2"
"@antv/scale" "~0.2.0"
"@antv/util" "~2.0.4"
"@antv/g2plot@^0.1.0-beta.5":
version "0.1.0-beta.5"
resolved "https://registry.npm.taobao.org/@antv/g2plot/download/@antv/g2plot-0.1.0-beta.5.tgz#97b73e593251a3ed6c2b658c131753ab98fdf7f0"
integrity sha1-l7c+WTJRo+1sK2WMExdTq5j99/A=
dependencies:
"@antv/component" "~0.4.0-beta.3"
"@antv/coord" "~0.2.2"
"@antv/dom-util" "~2.0.1"
"@antv/event-emitter" "^0.1.1"
"@antv/g" "~3.5.0-beta.1"
"@antv/g-gesture" "~0.1.0-beta.2"
"@antv/g2" "~3.6.0-beta.4"
"@antv/gui" "~0.1.0-beta.4"
"@antv/matrix-util" "~2.0.2"
"@antv/scale" "^0.2.1"
"@antv/util" "~2.0.4"
fecha "~3.0.3"
resize-observer-polyfill "^1.5.1"
tslib "^1.10.0"
"@antv/g@~3.5.0-beta.1":
version "3.5.0-beta.1"
resolved "https://registry.npm.taobao.org/@antv/g/download/@antv/g-3.5.0-beta.1.tgz#0b1b3e80eeb99ccf450fee1e7796dc37bc6c0978"
integrity sha1-Cxs+gO65nM9FD+4ed5bcN7xsCXg=
dependencies:
"@antv/event-emitter" "^0.1.0"
"@antv/gl-matrix" "~2.7.1"
"@antv/util" "~1.3.1"
d3-ease "~1.0.3"
d3-interpolate "~1.1.5"
d3-timer "~1.0.6"
"@antv/gatsby-theme-antv@^0.9.7":
version "0.9.44"
resolved "https://registry.npm.taobao.org/@antv/gatsby-theme-antv/download/@antv/gatsby-theme-antv-0.9.44.tgz#8c85317444a4ae25d9bf0b1ee188e39a6493338a"
@ -110,6 +216,63 @@
ts-jest "^24.1.0"
typescript "^3.6.3"
"@antv/gl-matrix@^2.7.1", "@antv/gl-matrix@~2.7.1":
version "2.7.1"
resolved "https://registry.npm.taobao.org/@antv/gl-matrix/download/@antv/gl-matrix-2.7.1.tgz#acb8e37f7ab3df01345aba4372d7942be42eba14"
integrity sha1-rLjjf3qz3wE0WrpDcteUK+QuuhQ=
"@antv/gui@~0.1.0-beta.4":
version "0.1.0-beta.4"
resolved "https://registry.npm.taobao.org/@antv/gui/download/@antv/gui-0.1.0-beta.4.tgz#89a58d45b15cccc80fa5c783378327b4e8c39b3c"
integrity sha1-iaWNRbFczMgPpceDN4MntOjDmzw=
dependencies:
"@antv/dom-util" "^2.0.1"
"@antv/g" "~3.5.0-beta.1"
"@antv/path-util" "^2.0.0"
"@antv/scale" "~0.2.0"
"@antv/util" "~2.0.0"
tslib "^1.10.0"
"@antv/matrix-util@^2.0.2", "@antv/matrix-util@~2.0.1-beta.1", "@antv/matrix-util@~2.0.2":
version "2.0.4"
resolved "https://registry.npm.taobao.org/@antv/matrix-util/download/@antv/matrix-util-2.0.4.tgz#13a6e08c936a37ee70eee2bc714d6206b209bc70"
integrity sha1-E6bgjJNqN+5w7uK8cU1iBrIJvHA=
dependencies:
"@antv/gl-matrix" "^2.7.1"
"@antv/util" "~2.0.0"
tslib "^1.10.0"
"@antv/path-util@^2.0.0", "@antv/path-util@^2.0.2", "@antv/path-util@^2.0.3":
version "2.0.4"
resolved "https://registry.npm.taobao.org/@antv/path-util/download/@antv/path-util-2.0.4.tgz#d3f48f9a38dde712391cdcbbac42ab7742ce6cd2"
integrity sha1-0/SPmjjd5xI5HNy7rEKrd0LObNI=
dependencies:
"@antv/util" "~2.0.0"
tslib "^1.10.0"
"@antv/scale@^0.2.1", "@antv/scale@~0.2.0":
version "0.2.1"
resolved "https://registry.npm.taobao.org/@antv/scale/download/@antv/scale-0.2.1.tgz?cache=0&sync_timestamp=1569479536220&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40antv%2Fscale%2Fdownload%2F%40antv%2Fscale-0.2.1.tgz#f5a54919c9161eb791be289e0a827afdd4439cdb"
integrity sha1-9aVJGckWHreRviieCoJ6/dRDnNs=
dependencies:
"@antv/util" "~2.0.3"
moment "^2.24.0"
tslib "^1.10.0"
"@antv/util@~1.3.1":
version "1.3.1"
resolved "https://registry.npm.taobao.org/@antv/util/download/@antv/util-1.3.1.tgz?cache=0&sync_timestamp=1572438102677&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40antv%2Futil%2Fdownload%2F%40antv%2Futil-1.3.1.tgz#30a34b201ff9126ec0d58c72c8166a9c3e644ccd"
integrity sha1-MKNLIB/5Em7A1YxyyBZqnD5kTM0=
dependencies:
"@antv/gl-matrix" "^2.7.1"
"@antv/util@~2.0.0", "@antv/util@~2.0.3", "@antv/util@~2.0.4":
version "2.0.6"
resolved "https://registry.npm.taobao.org/@antv/util/download/@antv/util-2.0.6.tgz?cache=0&sync_timestamp=1572438102677&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40antv%2Futil%2Fdownload%2F%40antv%2Futil-2.0.6.tgz#cf0a97de31d4594ab53f49ebcdb7dee85d3e600e"
integrity sha1-zwqX3jHUWUq1P0nrzbfe6F0+YA4=
dependencies:
tslib "^1.10.0"
"@babel/cli@^7.6.4":
version "7.6.4"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.6.4.tgz#9b35a4e15fa7d8f487418aaa8229c8b0bc815f20"
@ -7993,6 +8156,11 @@ d3-dsv@^1.1.1:
iconv-lite "0.4"
rw "1"
d3-ease@^1.0.5, d3-ease@~1.0.3:
version "1.0.5"
resolved "https://registry.npm.taobao.org/d3-ease/download/d3-ease-1.0.5.tgz#8ce59276d81241b1b72042d6af2d40e76d936ffb"
integrity sha1-jOWSdtgSQbG3IELWry1A522Tb/s=
d3-format@1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.1.tgz#c45f74b17c5a290c072a4ba7039dd19662cd5ce6"
@ -8010,6 +8178,13 @@ d3-interpolate@1:
dependencies:
d3-color "1"
d3-interpolate@~1.1.5:
version "1.1.6"
resolved "https://registry.npm.taobao.org/d3-interpolate/download/d3-interpolate-1.1.6.tgz#2cf395ae2381804df08aa1bf766b7f97b5f68fb6"
integrity sha1-LPOVriOBgE3wiqG/dmt/l7X2j7Y=
dependencies:
d3-color "1"
d3-scale@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.2.0.tgz#4071896216b3173caccd944be209e73c8c244e5d"
@ -8033,6 +8208,11 @@ d3-time@1:
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1"
integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==
d3-timer@~1.0.6:
version "1.0.9"
resolved "https://registry.npm.taobao.org/d3-timer/download/d3-timer-1.0.9.tgz#f7bb8c0d597d792ff7131e1c24a36dd471a471ba"
integrity sha1-97uMDVl9eS/3Ex4cJKNt1HGkcbo=
d@1, d@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a"
@ -9860,6 +10040,11 @@ fd-slicer@~1.1.0:
dependencies:
pend "~1.2.0"
fecha@~3.0.3:
version "3.0.3"
resolved "https://registry.npm.taobao.org/fecha/download/fecha-3.0.3.tgz#fabbd416497649a42c24d34bfa726b579203a1e2"
integrity sha1-+rvUFkl2SaQsJNNL+nJrV5IDoeI=
figgy-pudding@^3.4.1, figgy-pudding@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
@ -21969,10 +22154,10 @@ ts-pnp@^1.1.2:
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.4.tgz#ae27126960ebaefb874c6d7fa4729729ab200d90"
integrity sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw==
tslib@^1.6.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
tslib@^1.10.0, tslib@^1.6.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo=
tslint-config-prettier@^1.15.0:
version "1.18.0"