I have declared my map with pre-defined map scales like this

//Create Map
    map = new OpenLayers.Map('map',{controls: [],
    maxExtent: new
OpenLayers.Bounds(-3508.86612616335,5778517.56154675,33162.5587151875,5808814.49155551),
    maxResolution: 'auto',
    scales:
[74153,50000,32957,21971,14648,9765,6510,4340,2893,1929,1286,857,572,381,254,169],
    numZoomLevels: 16,
    units: 'm',
    projection: new OpenLayers.Projection("EPSG:3776"),
    displayProjection: new OpenLayers.Projection("EPSG:900913")
    });

Well I am trying to make a combo box to change the map scale at will.
Unfortunately my second scale amount (and several others) when I alert the
value it is not really 50000 but it is 49999.9999999. I have tried to use
this value but it won't change the scale. Is there any way to stop this so
my scale is actually 50000 and dropping the decimals.. otherwise I don't see
a way I can actually change my scale properly. Appreciate any advice.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Pre-Defined-map-scale-why-is-some-of-them-decimals-tp5800247p5800247.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to