Dik*_*eep 6 javascript react-native
我想检查地图的边界,以便我可以根据边界应用聚类。
var bounds = map.getBounds();
var ne = bounds.getNorthEast(); // LatLng of the north-east corner
var sw = bounds.getSouthWest(); // LatLng of the south-west corner
我通过 latitudeDelta 和 longitudeDelta 查找缩放级别解决了我的问题。
let zoom = Math.round(Math.log(360 / region.longitudeDelta) / Math.LN2);
this.zoom = zoom;
| 归档时间: |
|
| 查看次数: |
3598 次 |
| 最近记录: |