MAPBOX构建足迹计算点击事件上的区域-2D
我正在尝试为我的网站创建建筑足迹地图。 我已经成功地对其进行了样式,但是由于某种原因,我似乎无法将数据获取在“瓷砖”下。 如果有人能提供帮助,我也愿意付款。
谢谢
这是预览链接:
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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
点击事件包括鼠标下方的所有功能(从最高的下降)。这是单击时如何访问其属性的示例: 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 themousemove
event, but you can simply change that to aclick
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/