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

官方示例 vue2 demo 编译错误 #2678

Open
HarrisonLS opened this issue Mar 6, 2025 · 4 comments
Open

官方示例 vue2 demo 编译错误 #2678

HarrisonLS opened this issue Mar 6, 2025 · 4 comments
Assignees

Comments

@HarrisonLS
Copy link

HarrisonLS commented Mar 6, 2025

问题描述

借这个示例引出两个问题:

1 、 由于项目问题无法使用 node v16 以上版本,maplibre编译会有问题,有什么好的解决方法吗

Image

2 、不通过 npm 安装,通过 CDN 引入包,在 vue2 项目中 会出现一个关于 getOptions的上下文错误,如何解决?

Image
  • node环境: v12.22.12
  • vue: v2.5.2

重现链接

https://codesandbox.io/p/sandbox/l720vue-uef1x?file=%2Fpackage.json%3A9%2C5

重现步骤

访问页面即可

预期行为

No response

平台

  • 操作系统: macOS
  • 网页浏览器: Google Chrome

屏幕截图或视频(可选)

Image

补充说明(可选)

No response

Copy link
Contributor

github-actions bot commented Mar 6, 2025

hi @HarrisonLS, welcome!

Copy link
Contributor

github-actions bot commented Mar 6, 2025

Hi @HarrisonLS, Please star this repo if you find it useful! Thanks ⭐!
你好~ @HarrisonLS 🌟 如果这个仓库对你有帮助,可以给我们点个star支持一下~你的支持对我们来说是最大的鼓励,感谢你的支持与点赞 🌟

Copy link

目前没有找到与您的问题相关的其他报告。您提到的问题是唯一的。

为了更好地帮助您解决这个问题,您可以尝试以下步骤:

  1. 检查依赖版本:确保您的项目中使用的依赖版本与官方示例中的版本一致。
  2. 查看控制台错误信息:在浏览器的开发者工具中查看是否有任何错误信息,这可能会提供更多的线索。
  3. 更新依赖:尝试更新项目中的依赖项,看看是否能解决问题。

如果这些步骤无法解决问题,您可以提供更多的错误信息或日志,以便我能更好地帮助您。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@lzxue
Copy link
Contributor

lzxue commented Mar 7, 2025

#监听 loaded 事件

scene.on('loaded', async () => {})

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

3 participants