Hi Pietro,

 You could try this (untested):

   $nScaleDenom = 50000; // your scaledenom value
   $oCenter = ms_newPointObj();
   $nX = $oMap->width / 2;
   $nY = $oMap->height / 2;
   $oCenter->setXY($nX,$nY);
$oMap->zoomscale($nScaleDenom, $oCenter, $oMap->width, $oMap->height, $oMap->extent);

 Regards,

Alexandre

Pietro Giannini wrote:
Hi Anders,
the mapObject.scale is deprecated, use mapObject.scaledenom. It is the denominator of the scale ratio: if the scale is 1:100000, the mapObject.scale(denom) is 100000. This is a read-only property, it cannot be set programmatically because it is set by the mapObject.drawMap() function, but you can use the mapObject.zoomscale() function. Take a look here: http://mapserver.org/mapscript/php/index.html#mapobj-class.

Zoomlevel I don't know, perhaps you refer to zoomfactor, that is a parameter of the mapObject.zoompoint() function.

hth
bye ...................pg




--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to