LeafletJS Measurement of distance in deepzoom tilelayer

المشرف العام

Administrator
طاقم الإدارة
I have been trying to understand how LeafletJS determines distances between two points in a layer. I am trying to implement the custom scale plugin, (and have done so successfully) on a static tiled image using the leaflet deepzoom tilelayer plugin.

Added Information

Using CRS.Simple, the image zoom is adjusted by powers of 2 by the looks of it:

CRS.Simple seems to operate in powers of 2:

o.CRS.Simple=o.extend({},o.CRS,{projection:eek:.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}})

Constants that I know:

  1. DPI
  2. tile size (256 x 256 pixels)
  3. map size in pixels (bounds of the image)
  4. leaflet zoom level
  5. size of image in the real world
What do I change in Leaflet to allow me to make accurate scale bars?



أكثر...
 
أعلى