[mapserver-dev] variable substitution for projection

Stephen Woodbridge woodbri at swoodbridge.com
Wed Dec 21 20:55:46 EST 2011


Zach,

Why would you want to change the projection of a layer?

The projection of a layer should be constant as it defines the 
projection of the data that is in that layer.

So unless you are doing something like changing the data source AND also 
needing to then change the projection because the new data is in another 
projection, then I can not imagine that you are going to get any useful 
results doing this.

-Steve W

On 12/21/2011 5:23 PM, Zach Aller wrote:
> that seem's to have done the trick sort of now i am just wondering if i
> can set that for a specific layer i tried
>
> map.layer[layername].projection
>
> but that did not seem to work. Setting the map projection will probably
> be fine for our project at least for now.
>
> On Wed, Dec 21, 2011 at 11:04 AM, Lime, Steve D (DNR)
> <Steve.Lime at state.mn.us <mailto:Steve.Lime at state.mn.us>> wrote:
>
>     Zach: You should be able to change the projection through the URL
>     like so:
>
>        …&map.projection=EPSG:3158&…
>
>     No need to runtime subs…
>
>     Steve
>
>     *From:*mapserver-dev-bounces at lists.osgeo.org
>     <mailto:mapserver-dev-bounces at lists.osgeo.org>
>     [mailto:mapserver-dev-bounces at lists.osgeo.org
>     <mailto:mapserver-dev-bounces at lists.osgeo.org>] *On Behalf Of *Zach
>     Aller
>     *Sent:* Tuesday, December 20, 2011 5:28 PM
>     *To:* mapserver-dev at lists.osgeo.org
>     <mailto:mapserver-dev at lists.osgeo.org>
>     *Subject:* [mapserver-dev] variable substitution for projection
>
>     ok i am working with mapserver and a nodejs project and so i am
>     calling mapserver like so.
>
>     mapserv -nh
>     "/getPreviewImg.map&mode=map&mapext='+req.params.extent+'&filename='+req.params.imgname+'&projection=3158"
>
>     the issue is that mapserver dose not support projection based run
>     time substitution and so i was wondering if that is possible to add
>     and how hard it would be (maybe i could to it myself etc if pointed
>     in right direction because i have no experience with mapserver's src)
>
>     map file example thats what i want to replace
>
>     PROJECTION
>     "init=epsg:%projection%"
>     END
>
>     or perhaps even this then i could build what ever
>
>     PROJECTION
>          %projection%
>     END
>
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list