[Qgis-developer] Convert QGIS layer scale to OL3 resolution

Tom Chadwin tom.chadwin at nnpa.org.uk
Mon Jul 13 13:43:55 PDT 2015


>From OL2'S scaleToResolution():

 resolution = 1 / ((1 / scale) * (inches / map unit) * dpi)

ie

resolution = 1 / ((1 / scale) * (100 / 2.54) * 90.7)

Is that right (for map unit = metre, and dpi = 90.7 [1])? 

Will this be correct only if the OL3 map's projection is in metres? Will I
have to change the unit if required to degrees etc?

[1] http://gis.stackexchange.com/a/29733



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Convert-QGIS-layer-scale-to-OL3-resolution-tp5215277p5215486.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list