[OpenLayers-Dev] scale computation

bartvde at osgis.nl bartvde at osgis.nl
Mon Jul 28 09:01:42 EDT 2008


Hi list,

I am tracking down a difference in scale computation between OpenLayers
and Mapserver. I've given both the standard OGC resolution (dpi) of 90.71,
but still there is a difference. I.e. my MAP file says 25000, but in OL it
only becomes visible at 24998.

Could the difference be that Mapserver uses (width-1) is its scale
computation?

    md = (width-1)/(resolution*msInchesPerUnit(units, center_y)); /*
remember, we use a pixel-center to pixel-center extent, hence the
width-1 */

Best regards,
Bart




More information about the Dev mailing list