gpt4 book ai didi

leaflet - 如何在距离以米为单位的 LatLng 点周围创建 LatLngBounds?

转载 作者:行者123 更新时间:2023-12-04 13:26:10 24 4
gpt4 key购买 nike

我想在 X 米处围绕中心点 (LatLng) 创建一个正方形 (LatLngBounds)。

最佳答案

使用 L.LatLng.toBounds() method ,例如

var center = L.latLng(40,-3);
var bounds = center.toBounds(500);

或者
var bounds = L.latLng(40,-3).toBounds(500)

关于leaflet - 如何在距离以米为单位的 LatLng 点周围创建 LatLngBounds?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40282051/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com