On 11-06-03 10:07 AM, [email protected] wrote:
HI,I wanna use the mapserver's rotation fuction with php script, but when i used this function the map view rectangle rotated strangely, I cannot find the rotation regular rules, enclosed with my simplised php code, attachments are pics of the results. appriciate it if you can tell me what's the problems. regards william codes are following <?php dl('php_mapscript.dll'); $map=ms_newMapObj("C:/OSGeo4W/apache/htdocs/xxxx.map"); //$roate=$map->setRotation(90); $roate=$map->setRotation(0.00000001); //************** here you see, even with a small angle, the map could not rotated as expection //echo $roate; $image=$map->draw(); $image_url=$image->saveWebImage();
Wyan, Map rotation forces use of the resampling api which requires proper coordinate system information attached to everything (layers and map). Is it possible this is not the case? If you can boil this down to a sufficiently simple case to demonstrate the problem, and provide it to me perhaps I can look into the issue. Note that you can also set rotation in a mapfile. You might want to see if setting the ANGLE keyword in your mapfile seems to work properly. There is a test case for map rotation in the autotest suite which still seems to work fine at: http://svn.osgeo.org/mapserver/trunk/msautotest/gdal/rot_out.map It is possible there is an issue with the PHP binding for setRotation() (which I am sure is very rarely used) or perhaps the issue is something about your map configuration. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
