Saturday 22 April 2017

geoserver - How to calculate the scale of current Zoom Level with parameters like extent, resolution?


I got the following parameters:



Width and height of Map: 450px, 560px

units : 'meters'

maxExtent : new OpenLayers.Bounds(806677.9759,802420.9858,8876817.5647,853497.8186405064)

resolutions: [199.51887828322785, 99.75943914161392, 49.87971957080696,
24.93985978540348, 12.46992989270174, 6.23496494635087, 3.117482473175435,
1.5587412365877176, 0.7793706182938588, 0.3896853091469294, 0.1948426545734647,
0.09742132728673235, 0.048710663643366174, 0.024355331821683087, 0.012177665910841544,

0.006088832955420772, 0.003044416477710386, 0.001522208238855193]

numZoomLevels: 18

OpenLayers.DOTS_PER_INCH = 90.71428571428572;

Who inspire me how to calculate the scale of current Zoom Level?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...