设置 Leaflet 视图缩放单位。

huangapple go评论76阅读模式
英文:

Leaflet setView Zoom unit

问题

I was wondering how the conversion rate in km is at the zoom level, how many km are displayed at a zoom of 15? I have not found anything regarding this or searched incorrectly.

想知道在缩放级别15时,每个缩放单位是多少千米?我没有找到相关信息或者搜索有误。

I want to know what kind of km radius will be displayed on the map with a zoom of 15, and how much the increase or decrease of +1/-1 will be in km.

我想知道在缩放级别15时地图上会显示多少千米的半径,并且+1/-1 缩放级别会导致多少千米的增加或减少。

英文:

i was wondering how the conversion rate in km is at the zoom level, how many km are displayed at a zoom of 15? have not found anything regarding this or searched incorrectly

this.map=L.map('mapId' ,{ zoomControl: false, attributionControl:false }).setView([this.currentLat, this.currentLong], 15);

want to know what kind of km radius will be displayed on the map with a zoom of 15, and how much the increase or decrease of +1/-1 will be in km

答案1

得分: 1

根据传单文件:

当我们表示世界在缩放级别零时,它宽高各为256像素。当我们进入缩放级别一时,它的宽度和高度加倍。在每个缩放级别,每个瓷砖被分成四个,并且其大小(由tileSize选项给出的边缘长度)加倍,使面积增加四倍(换句话说,世界的宽度和高度为256·2^缩放级别像素)。

你可以在这里查看它:https://leafletjs.com/examples/zoom-levels/

英文:

according to the leaflet documents:

> When we represent the world at zoom level zero, it’s 256 pixels wide
> and high. When we go into zoom level one, it doubles its width and
> height. At each zoom level, each tile is divided in four, and its size (length of the edge, given by the tileSize option) doubles, quadrupling the area. (in other words, the width and height of the world is 256·2zoomlevel pixels)

you can check it here : https://leafletjs.com/examples/zoom-levels/

huangapple
  • 本文由 发表于 2023年5月14日 23:08:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76248187.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定