[mapserver-users] Make on new map on a new page

Frank Koormann frank.koormann at intevation.de
Wed Jan 30 05:35:21 EST 2002


* Renaud RL. LAIRE (sig at parc-livradois-forez.org) [020129 12:44]:
> Hi,
>  
> I just want to add a button on my page to produce another page with the
> [Map] in fixed size, the [legend], and the [scale].
> But i don't how to transfer the variable [mapex] to another page via the
> URL.
>  
> First i add a new fonction in javascript :
>  
> function print(){
>   
>  
> location.href='http://neptune/cgi-bin/mapserv3.5.exe?s=i&map=c:/demo/atl
> as/com.map&map_web_template=print.htm&'+'&mapsize=1024+745&mapext='+docu
> ment.mapserv.imgext.value;
> }
>  
> But it doesn't work 
>  

The point is that imgext (or [mapext]) contain the extent space
delimited. These are not valid in an URL. You may either:

o Define the buttoon witin a seperate form:
        <form method=GET action=http://neptune/cgi-bin/mapserv3.5.exe>
        <input type="hidden" name="map" value="c:/demo/atlas/com.map">
        ...
        <input type="hidden" name="mapext" value="[mapext]">
        <input type="submit" value="Print-View">
        </form>

o Put it all in an URL and ensure encoding of these values, ie. [mapext_esc]:
        <a href="http://neptune/cgi-bin/mapserv3.5.exe?s=i&map=c:/demo/atlas/com.map&map_web_template=print.htm&mapsize=1024+745&mapext=[mapext_esc]">PrintView</a>
       
Regards,

        Frank

-- 
Frank Koormann                             <frank.koormann at intevation.de>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)



More information about the mapserver-users mailing list