mirror of https://gitee.com/antv-l7/antv-l7
refactor(a): add l7-draw source
This commit is contained in:
parent
c99a023a95
commit
54ba3889b0
|
@ -30,4 +30,4 @@ export default function glsl(include, minify) {
|
|||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.8.3/polyfill.min.js"></script>
|
||||
<script src="https://api.mapbox.com/mapbox-gl-js/v1.8.0/mapbox-gl.js"></script>
|
||||
<script src="../dist/l7.js"></script>
|
||||
<script src="../dist/l7-dev.js"></script>
|
||||
<script>
|
||||
console.log(L7);
|
||||
const scene = new L7.Scene({
|
||||
|
|
|
@ -38,18 +38,6 @@ export default React.memo(function Map() {
|
|||
bottom: 0,
|
||||
}}
|
||||
>
|
||||
<SceneContext.Consumer>
|
||||
{(scene) => {
|
||||
console.log(scene);
|
||||
return null;
|
||||
}}
|
||||
</SceneContext.Consumer>
|
||||
<SceneEvent
|
||||
type="click"
|
||||
handler={() => {
|
||||
console.log('click');
|
||||
}}
|
||||
/>
|
||||
<Popup lnglat={[110.1938, 50.25] as number[]}>
|
||||
<p>122222</p>
|
||||
</Popup>
|
||||
|
|
|
@ -30,6 +30,9 @@ export default React.memo(function Map() {
|
|||
bottom: 0,
|
||||
}}
|
||||
>
|
||||
<Popup lnglat={[110.1938, 50.25] as number[]}>
|
||||
<p>122222</p>
|
||||
</Popup>
|
||||
{data && [
|
||||
<PolygonLayer
|
||||
key={'2'}
|
||||
|
@ -54,6 +57,7 @@ export default React.memo(function Map() {
|
|||
opacity: 1,
|
||||
}}
|
||||
/>,
|
||||
|
||||
<LineLayer
|
||||
key={'21'}
|
||||
source={{
|
||||
|
|
|
@ -107,7 +107,7 @@ export default React.memo(function Map() {
|
|||
zoom: 1,
|
||||
}}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
// position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
|
|
Loading…
Reference in New Issue