MAPBOX构建足迹计算点击事件上的区域-2D

发布于 2025-02-05 18:50:05 字数 671 浏览 3 评论 0原文

我正在尝试为我的网站创建建筑足迹地图。 我已经成功地对其进行了样式,但是由于某种原因,我似乎无法将数据获取在“瓷砖”下。 如果有人能提供帮助,我也愿意付款。

谢谢

这是预览链接:

https://api.mapbox.com/styles/v1/usamamughal95/cl45gdj9l000o14pnqdv4gjes.html?title=copy&access_token=pk.eyJ1IjoidXNhbWFtdWdoYWw5NSIsImEiOiJjbDQ1YXJmNjQwZjV2M2RuaXhzdm1pYjJ2In0.g-M02P6auU6mcxzUMAwVaA& ; ZoomWheel = true& Fresh = true#17.2/33.761552/-118.407553

I'm trying to create a Building footprints map for my Website.
I have styled it successfully but for some reason I can't seem to get the data under 'Tileset'.
If anyone can help, I'm willing to pay as well.

Thanks

Here's the preview link:

https://api.mapbox.com/styles/v1/usamamughal95/cl45gdj9l000o14pnqdv4gjes.html?title=copy&access_token=pk.eyJ1IjoidXNhbWFtdWdoYWw5NSIsImEiOiJjbDQ1YXJmNjQwZjV2M2RuaXhzdm1pYjJ2In0.g-M02P6auU6mcxzUMAwVaA&zoomwheel=true&fresh=true#17.2/33.761552/-118.407553

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柏林苍穹下 2025-02-12 18:50:05

点击事件包括鼠标下方的所有功能(从最高的下降)。这是单击时如何访问其属性的示例: https://docs.mapbox.com/mapbox-gl-js/example/polygon-popup-on-click/

如果您想获取地图上的任何显示功能的详细信息,则可以使用QueryRenderedFeatures函数。此示例使用mousemove事件,但是您可以将其更改为单击事件: https://docs.mapbox.com/mapbox-gl-js/example/queryrenderedfeatures/

这是一个类似的示例: https://docs.mapbox.com/mapbox-glbox.com/mapbox-gl-js/example/ QueryRenderedFeatures-Around Point/

The click event includes an array of all features under the mouse (from top-most down). Here is an example of how to access their properties when clicking: https://docs.mapbox.com/mapbox-gl-js/example/polygon-popup-on-click/

If you want to get the details of any displayed feature on the map, you can use the queryRenderedFeatures function. This example uses the mousemove event, but you can simply change that to a click event: https://docs.mapbox.com/mapbox-gl-js/example/queryrenderedfeatures/

Here is a similar example: https://docs.mapbox.com/mapbox-gl-js/example/queryrenderedfeatures-around-point/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文