Showing multiple layers using one checkbox {Scanned} {Scanned}
Siki Zoltan
siki at AGT.BME.HU
Tue Feb 6 02:32:37 PST 2007
Hi,
You should add relative or absolut URL in src tag. e.g
<img src="/path_from_DocumentRoot/legend.gif" width="159" height="77"
border="0">
or
<img src="http://server_name_or_ip/path_from_DocumentRoot/legend.gif"
width="159" height="77" border="0">
or
<img src="relativ_path_from_cgi-bin/legend.gif"
width="159" height="77" border="0">
(relativ path probably starts ../)
For example if your legend.gif is in the images directory of the
DocumentRoot directory of your server then
<img src="/images/legend.gif" width="159" height="77" border="0">
or
<img src="http://192.168.1.130/images/legend.gif" width="159" height="77"
border="0">
or
<img src="../images/legend.gif" width="159" height="77" border="0">
Bye
Zoltan
On Tue, 6 Feb 2007, Bradley Mclain wrote:
> Thanks I created a static image showing the layers I want, only problem is
> that once the mapserver invokes the map, the image fails to load because it
> has the mapserver-cgi directory infront of the image path, how do I avoid
> this?
>
> Image Declaration:
> <td>
> <p>Legend:<br>
> <img src="legend.gif" width="159" height="77" border="0">
> </td>
>
> Broken Path:
> http://192.168.1.130/cgi-bin/legend.gif
>
> Also on the same note as this currently my map does not show up on first
> load you must click on it to get it load. It would be much better to have
> the map load on page load. I will include the html file as well.
>
> Brad
>
>
>
>
> >From: "Fischer, Brian" <bfischer at HOUSTONENGINEERINGINC.COM>
> >Reply-To: "Fischer, Brian" <bfischer at HOUSTONENGINEERINGINC.COM>
> >To: MAPSERVER-USERS at LISTS.UMN.EDU
> >Subject: Re: [UMN_MAPSERVER-USERS] Showing multiple layers using one
> >checkbox
> >Date: Mon, 5 Feb 2007 08:22:46 -0600
> >
> >If you want to always show the legend no matter what layers are turned
> >on or off. I would just pregenerate the legend once and have it linked
> >to a static image. No reason for mapserver to generate this everytime
> >the map changes on the fly when nothing in the legend is changing. The
> >easist way to do this is use the legend utility that comes with the
> >mapserver download. Just temporary set all your layers to on and run
> >the utility. It will generate an image to use. The easiest way to
> >handle the group layers is to only put the name in one of those layers
> >instead of all.
> >
> >Hope this helps,
> >Brian
> >
> >
> >Brian Fischer
> >Houston Engineering, Inc.
> >Maple Grove, MN
> >(763) 493-4522
> >
> >-----Original Message-----
> >From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> >Behalf Of Bradley Mclain
> >Sent: Sunday, February 04, 2007 10:29 PM
> >To: MAPSERVER-USERS at LISTS.UMN.EDU
> >Subject: Re: [UMN_MAPSERVER-USERS] Showing multiple layers using one
> >checkbox
> >
> >Excellent just what I was looking for thanks.
> >
> >Any chance you know how to fix up my legend now, there are two things
> >wrong with it. Firstly I want it to show the name of the groups not the
> >layers and secondly, I want it show them even when they are unticked.
> >currently they dissapear off the key when unticked.
> >
> >Brad
> >
> >
> >
> >
> > >From: "Fischer, Brian" <bfischer at HOUSTONENGINEERINGINC.COM>
> > >Reply-To: "Fischer, Brian" <bfischer at HOUSTONENGINEERINGINC.COM>
> > >To: MAPSERVER-USERS at LISTS.UMN.EDU
> > >Subject: Re: [UMN_MAPSERVER-USERS] Showing multiple layers using one
> > >checkbox
> > >Date: Sun, 4 Feb 2007 21:57:35 -0600
> > >
> > >Brad,
> > >
> > >The easiest way to do this would be to use the GROUP parameter in the
> > >mapfile. This would turn all layers on with the same name in the GROUP
> >
> > >parameter.
> > >
> > >Another option is to use a javascript function to alter the layers list
> >
> > >that is passed to the CGI on the OnClick event of the checkbox.
> > >
> > >-Brian
> > >
> > >________________________________
> > >
> > >From: UMN MapServer Users List on behalf of Bradley Mclain
> > >Sent: Sun 2/4/2007 4:12 PM
> > >To: MAPSERVER-USERS at LISTS.UMN.EDU
> > >Subject: [UMN_MAPSERVER-USERS] Showing multiple layers using one
> > >checkbox
> > >
> > >
> > >
> > >Ok I currently have a mapfile which has multiple layers which make up
> > >my image. I have set it up so that you can use a checkbox to turn these
> >
> > >on and off. What I want to do however is combine two of them into the
> > >one checkbox.
> > >
> > >E.g. Currently I have two different shapefiles making up a boundary for
> >
> > >a property. They are defined in seperate layers in the mapfile. I want
> > >them to both display when I tick a "Property Boundary" checkbox.
> > >
> > >Brad
> > >
> > >_________________________________________________________________
> > >Advertisement: Meet Sexy Singles Today @ Lavalife - Click here
> > >http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ec
> > >om%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%2
> > >6locale%3Den%5FAU%26a%3D23769&_t=754951090&_r=endtext_lavalife_dec_meet
> > >&_m=EXT
> >
> >_________________________________________________________________
> >Advertisement: Fresh jobs daily. Stop waiting for the newspaper. Search
> >Now!
> >www.seek.com.au
> >http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Ea
> >u&_t=757263760&_r=Hotmail_EndText_Dec06&_m=EXT
>
> _________________________________________________________________
> Advertisement: Meet Sexy Singles Today @ Lavalife - Click here
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D23769&_t=754951090&_r=endtext_lavalife_dec_meet&_m=EXT
>
More information about the MapServer-users
mailing list