-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(component): add popup marker service
- Loading branch information
Showing
53 changed files
with
431 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Scale, Zoom, Scene } from '@antv/l7'; | ||
import { Mapbox } from '@antv/l7-maps'; | ||
const scene = new Scene({ | ||
id: 'map', | ||
pitch: 0, | ||
type: 'mapbox', | ||
style: 'light', | ||
center: [ -97.119140625, 38.75408327579141 ], | ||
zoom: 2 | ||
map: new Mapbox({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 107.054293, 35.246265 ], | ||
zoom: 4.056 | ||
}) | ||
}); | ||
|
||
const zoomControl = new Zoom(); | ||
const scaleControl = new Scale({ | ||
position: 'rightbottom' | ||
}); | ||
const scaleControl = new Scale(); | ||
scene.addControl(zoomControl); | ||
scene.addControl(scaleControl); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
title: control | ||
order: 2 | ||
--- | ||
How to use the map control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
title: 组件 | ||
order: 2 | ||
--- | ||
|
||
|
||
如何使用组件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,11 @@ | ||
import { LineLayer, Scene } from '@antv/l7'; | ||
const scene = new Scene({ | ||
import { Scene } from '@antv/l7'; | ||
import { GaodeMap } from '@antv/l7-maps'; | ||
new Scene({ | ||
id: 'map', | ||
pitch: 0, | ||
type: 'mapbox', | ||
style: 'light', | ||
center: [ 102.602992, 23.107329 ], | ||
zoom: 13 | ||
map: new GaodeMap({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 107.054293, 35.246265 ], | ||
zoom: 4.056 | ||
}) | ||
}); | ||
|
||
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); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
title: Data | ||
order: 1 | ||
--- | ||
|
||
coming soon …… |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
title: 数据 | ||
order: 1 | ||
--- | ||
在路上 …… |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { Scene } from '@antv/l7'; | ||
import { GaodeMap } from '@antv/l7-maps'; | ||
new Scene({ | ||
id: 'map', | ||
pitch: 0, | ||
type: 'amap', | ||
style: 'dark', | ||
center: [ 121.40, 31.258134 ], | ||
zoom: 5 | ||
map: new GaodeMap({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 107.054293, 35.246265 ], | ||
zoom: 4.056 | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Scene } from '@antv/l7'; | ||
import { Mapbox } from '@antv/l7-maps'; | ||
new Scene({ | ||
id: 'map', | ||
pitch: 0, | ||
type: 'mapbox', | ||
style: 'light', | ||
center: [ -97.119140625, 38.75408327579141 ], | ||
zoom: 2 | ||
map: new Mapbox({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 107.054293, 35.246265 ], | ||
zoom: 4.056 | ||
}) | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
title: map | ||
order: 0 | ||
--- | ||
初始 L7 地图实例 | ||
|
||
how to use L7 Initialize third-party maps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
--- | ||
title: 地图 | ||
order: 0 | ||
redirect_from: | ||
- /zh/tutorial | ||
--- | ||
初始 L7 地图实例 | ||
介绍如何初始化一个第三方底图 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Scene, Marker, Popup } from '@antv/l7'; | ||
import { GaodeMap } from '@antv/l7-maps'; | ||
const scene = new Scene({ | ||
id: 'map', | ||
map: new GaodeMap({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 121.4316962, 31.26082325 ], | ||
zoom: 12.056 | ||
}) | ||
}); | ||
// 创建默认 marker | ||
const popup = new Popup({ | ||
offsets: [ 0, 20 ] | ||
}).setText('hello'); | ||
|
||
const marker = new Marker() | ||
.setLnglat([ 121.4316962, 31.26082325 ]) | ||
.setPopup(popup); | ||
|
||
scene.addMarker(marker); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Scale, Zoom, Scene } from '@antv/l7'; | ||
import { Mapbox } from '@antv/l7-maps'; | ||
const scene = new Scene({ | ||
id: 'map', | ||
map: new Mapbox({ | ||
style: 'light', | ||
pitch: 0, | ||
center: [ 107.054293, 35.246265 ], | ||
zoom: 4.056 | ||
}) | ||
}); | ||
|
||
const zoomControl = new Zoom(); | ||
const scaleControl = new Scale(); | ||
scene.addControl(zoomControl); | ||
scene.addControl(scaleControl); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"title": { | ||
"zh": "地图", | ||
"en": "Category" | ||
}, | ||
"demos": [ | ||
{ | ||
"filename": "amap.js", | ||
"title": "添加默认Marker", | ||
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*Gzj7SYk-vdEAAAAAAAAAAABkARQnAQ" | ||
}, | ||
{ | ||
"filename": "mapbox.js", | ||
"title": "MapBox底图组件", | ||
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*_SIYR50bbcoAAAAAAAAAAABkARQnAQ" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: control | ||
order: 2 | ||
--- | ||
add Rich text annotation to scene |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Marker | ||
order: 2 | ||
--- | ||
通过添加dom实现富文本地图标注 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.