[mapserver-users] Re: [OpenLayers-Users] Doubt with layers
Rafael chacón
rafaelchacon at gmail.com
Thu Jan 29 06:19:04 PST 2009
Hi, thanks for the answer.. I didn't have the layers in png or gif.. I did
that but the overlays is still not working.. Look how is the declaration
now .. I kind of stuck:
Mapserver:
MAP
size 800 600
imagetype 'png'
TRANSPARENT ON
imagecolor 0 0 255
extent -180 -90 180 90
SYMBOLSET "symbols"
PROJECTION
"init=epsg:4269"
END
WEB
IMAGEPATH "/var/www/apache2-default/gis_tests/tmp/"
IMAGEURL "/apache2-default/gis_tests/tmp/"
TEMPLATE "empty.html"
LOG "log"
metadata
wms_title "us_states"
wms_srs "EPSG:4269"
end
end
outputformat
name "png"
driver "GD/PNG"
imagemode "rgba"
extension "png"
mimetype "image/png"
imagemode RGBA
end
---------
Openlayers:
layer = new OpenLayers.Layer.MapServer( "Estados unidos",
"
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
{layers: 'us_states', 'format':'image/png'});
roads = new OpenLayers.Layer.MapServer( "Roads",
"
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
{layers: 'us_roads',transparent: 'true',
'format':'image/png'}, {isBaseLayer:false});
gps = new OpenLayers.Layer.MapServer( "GPS",
"
http://192.168.1.100/cgi-bin/mapserv?map=us_states.map",
{layers: 'gps_points', transparent: 'true',
'format':'image/png' }, {isBaseLayer:false});
roads.setVisibility(false);
gps.setVisibility(false);
Thaks for your help :)
On Thu, Jan 29, 2009 at 5:10 PM, Ivan Grcic <igrcic at gmail.com> wrote:
> hmm what are the layers image type? its has to be PNG/GIF to be
> transparent...
>
> i guess u have to add format: 'image/png', to layer options
>
> On Wed, Jan 28, 2009 at 9:13 PM, Rafael chacón <rafaelchacon at gmail.com>
> wrote:
> > Hi, the layers are showing as overlays (with baselayer set to false) I'm
> > adding some snapshot to show the behavior.
> >
> >
> >
> > On Thu, Jan 29, 2009 at 3:31 PM, Ivan Grcic <igrcic at gmail.com> wrote:
> >>
> >> Hi, check options:
> >>
> >> layer.isBaseLayer(true/false)
> >>
> >> map.setBaseLayer(layer)
> >>
> >> Cheers
> >>
> >> On Wed, Jan 28, 2009 at 8:51 PM, Rafael chacón <rafaelchacon at gmail.com>
> >> wrote:
> >> > Hi, I have the following layers defined:
> >> >
> >> > roads = new OpenLayers.Layer.MapServer( "Roads",
> >> >
> >> > "http://192.168.1.103/cgi-bin/mapserv?map=us_states.map",
> >> > {layers: 'us_roads', transparent:'true'});
> >> > gps = new OpenLayers.Layer.MapServer( "GPS",
> >> >
> >> > "http://192.168.1.103/cgi-bin/mapserv?map=us_states.map",
> >> > {layers: 'gps_points', transparent: 'true'});
> >> >
> >> > roads.setVisibility(false)
> >> > gps.setVisisibility(false)
> >> >
> >> >
> >> > Both layers work, but I have the following behavior: when one of the
> >> > layers
> >> > is active the other one disappears. Suppose I chose first the roads,
> >> > then
> >> > it show the roads. Then I select gps, then it shows the gps points but
> >> > roads
> >> > start to disappear. Any ideas why this happens??
> >> >
> >> > Thanks in advance.
> >> >
> >> >
> >> > --
> >> > Rafael Chacon,
> >> >
> >> > "El hombre es la medida de todas las cosas". Protagoras
> >> > _______________________________________________
> >> > Users mailing list
> >> > Users at openlayers.org
> >> > http://openlayers.org/mailman/listinfo/users
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Ivan Grcic
> >
> >
> >
> > --
> > Rafael Chacon,
> >
> > "El hombre es la medida de todas las cosas". Protagoras
> >
>
>
>
> --
> Ivan Grcic
>
--
Rafael Chacon,
"El hombre es la medida de todas las cosas". Protagoras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090130/f36c3872/attachment.htm>
More information about the MapServer-users
mailing list