Stefan,
 
Your question is not entirely clear. You can not re-project an individual layer on-the-fly, because php_mapscript does not re-write the dataset (hence its projection will always be the same); you CAN however change the projection of the map (using setProjection, as you did), which means all layers in the map get re-projected (the dataset remains unchanged, though). For this, it is required that your layer has a projection object with the native projection of that layer. This will cause the layer to be reprojected along with the map. Is this what you are trying to do? 
 
You *may* have to save your mapfile, or your session, in order for it to take effect, depending on your setup.
 
regards,
 
Jacob
 


From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Schwarzer
Sent: 24 August 2006 13:45
To: [email protected]
Subject: Re: [UMN_MAPSERVER-USERS] Mapscript Re-Projection on-the-fly

Hey,

I can't imagine that such a question stays unanswered in the mapserver community...

I meanwhile added a:

$map -> setProjection("init=epsg:26711");

to my code, but nothing happens - meaning: no error message but no reprojection either.

Can anyone help me out?

Thanks in advance.

Stefan


On Aug 22, 2006, at 10:47 AM, Stefan Schwarzer wrote:

Gush,

I couldn't find any precise information about how to re-project layers on-the-fly via PHP Mapscript. Here and there (via MailingList and Google) bits and pieces, but altogether it didn't help me a lot. Though I would have said that this is a basic question. But perhaps too basic, so everbody finds out by himself?

So, can anyone let me know - giving a coding example - how to re-project a mapfile on-the-fly from for example Lat/Long (global view) to Lambert or Robin? 

Thanks a lot for your help!



Reply via email to