Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

antv L7 过往教程出现uncaught runtime errors #2283

Closed
wsqstar opened this issue Feb 4, 2024 · 7 comments
Closed

antv L7 过往教程出现uncaught runtime errors #2283

wsqstar opened this issue Feb 4, 2024 · 7 comments
Assignees

Comments

@wsqstar
Copy link

wsqstar commented Feb 4, 2024

问题描述

参照:https://www.yuque.com/antv/blog/geicx9
刷新即报错:
Uncaught runtime errors:
×
ERROR
(regl) missing attribute a_Position in command http://localhost:3000/static/js/bundle.js:71077:24
at raise (http://localhost:3000/static/js/bundle.js:170640:17)
at Function.commandRaise (http://localhost:3000/static/js/bundle.js:170935:5)
at ReglModel.draw (eval at compile (http://localhost:3000/static/js/bundle.js:175167:27), :326:22)
at ReglModel.REGLCommand [as drawCommand] (http://localhost:3000/static/js/bundle.js:178177:23)
at ReglModel.draw (http://localhost:3000/static/js/bundle.js:71140:12)
at http://localhost:3000/static/js/bundle.js:28416:15
at Array.forEach ()
at PointLayer.renderModels (http://localhost:3000/static/js/bundle.js:28415:19)
at PointLayer.render (http://localhost:3000/static/js/bundle.js:27709:12)
at LayerService._callee5$ (http://localhost:3000/static/js/bundle.js:20583:22)

重现链接

sandbox
No response

重现步骤

No response

预期行为

期望: 按照教程正常显示
结果:一开始显示正常,刷新即报错

平台

  • 操作系统:win11
  • 网页浏览器: edge

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@lzxue
Copy link
Contributor

lzxue commented Feb 4, 2024

提供一下复现Demo,或者直接跟进官网demo 查看 https://l7.antv.antgroup.com/examples

@wsqstar
Copy link
Author

wsqstar commented Feb 4, 2024

提供一下复现Demo,或者直接跟进官网demo 查看 https://l7.antv.antgroup.com/examples

看看可以吗 https://codesandbox.io/p/live/fcec8dfa-7e19-45ab-8a50-ce0fe21cf2f8 目前是重复绘制了 (上codesandbox就不会出现之前的错误)

@wsqstar
Copy link
Author

wsqstar commented Feb 4, 2024

我把代码复制了出来 https://github.com/wsqstar/starlake-pub 这个导入到codesandbox,并刷新就会复现同样的错误。

@lzxue
Copy link
Contributor

lzxue commented Feb 4, 2024

你代码写的有问题,export 用法不对

@wsqstar
Copy link
Author

wsqstar commented Feb 4, 2024

但是 这就是antv的官方教程 https://www.bilibili.com/video/BV1o44y1g7z9?t=38.7

@wsqstar
Copy link
Author

wsqstar commented Feb 4, 2024

如果这样写
e22be8ce4e9bba16b6f0e278e08a3ebb

也还会

image

@wsqstar
Copy link
Author

wsqstar commented Feb 4, 2024

经过朋友的一番排查 发现看起来就是地图还没出来就添加点图层,所以加不上
8c8a7373ee17b0468d683456976bfc81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants