refactor(a): add l7-draw source

This commit is contained in:
thinkinggis 2020-03-19 20:24:18 +08:00
parent c99a023a95
commit 54ba3889b0
5 changed files with 7 additions and 15 deletions

View File

@ -30,4 +30,4 @@ export default function glsl(include, minify) {
};
}
};
}
}

View File

@ -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({

View File

@ -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>

View File

@ -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={{

View File

@ -107,7 +107,7 @@ export default React.memo(function Map() {
zoom: 1,
}}
style={{
position: 'absolute',
// position: 'absolute',
top: 0,
left: 0,
right: 0,