-
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.
fix(package): fix package fsevents version
- Loading branch information
Showing
6 changed files
with
74 additions
and
70 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
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
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,14 +1,56 @@ | ||
import { Scene } from '@antv/l7'; | ||
import { Scene, PointLayer } from '@antv/l7'; | ||
import { GaodeMap } from '@antv/l7-maps'; | ||
|
||
const map = new AMap.Map('container', { | ||
resizeEnable: true, // 是否监控地图容器尺寸变化 | ||
zoom: 11, // 初始化地图层级 | ||
center: [ 116.397428, 39.90923 ] // 初始化地图中心点 | ||
}); | ||
new Scene({ | ||
id: 'map', | ||
map: new GaodeMap({ | ||
mapInstance: map | ||
}) | ||
}); | ||
window.onLoad = function() { | ||
const map = new AMap.Map('map', { | ||
viewMode: '3D', | ||
pitch: 0, | ||
mapStyle: 'amap://styles/darkblue', | ||
center: [ 121.435159, 31.256971 ], | ||
zoom: 14.89, | ||
minZoom: 10 | ||
}); | ||
const scene = new Scene({ | ||
id: 'map', | ||
map: new GaodeMap({ | ||
mapInstance: map | ||
}) | ||
}); | ||
fetch( | ||
'https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json' | ||
) | ||
.then(res => res.json()) | ||
.then(data => { | ||
const pointLayer = new PointLayer() | ||
.source(data, { | ||
parser: { | ||
type: 'json', | ||
x: 'longitude', | ||
y: 'latitude' | ||
} | ||
}) | ||
.shape('name', [ | ||
'circle', | ||
'triangle', | ||
'square', | ||
'pentagon', | ||
'hexagon', | ||
'octogon', | ||
'hexagram', | ||
'rhombus', | ||
'vesica' | ||
]) | ||
.size('unit_price', [ 10, 25 ]) | ||
.color('name', [ '#5B8FF9', '#5CCEA1', '#5D7092', '#F6BD16', '#E86452' ]) | ||
.style({ | ||
opacity: 0.3, | ||
strokeWidth: 2 | ||
}); | ||
scene.addLayer(pointLayer); | ||
}); | ||
}; | ||
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=15cd8a57710d40c9b7c0e3cc120f1200&callback=onLoad'; | ||
const jsapi = document.createElement('script'); | ||
jsapi.charset = 'utf-8'; | ||
jsapi.src = url; | ||
document.head.appendChild(jsapi); |
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