[mapserver-dev] variable substitution for projection

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Wed Dec 21 17:59:58 EST 2011


Syntax will be a little different since it's not a top-level object, try:

  ...& map.layer[layername]=PROJECTION+EPSG:3158+END&...

That syntax would probably work for the map.projection method too (the PROJECTION/END should be stripped off).

Steve


From: Zach Aller [mailto:allerzach at gmail.com]
Sent: Wednesday, December 21, 2011 4:24 PM
To: Lime, Steve D (DNR)
Cc: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] variable substitution for projection

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20111221/5d5f7669/attachment-0001.html


More information about the mapserver-dev mailing list