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:<br><br>Mapserver:<br><br><br>MAP<br> size 800 600<br>
imagetype 'png'<br> TRANSPARENT ON<br> imagecolor 0 0 255<br> extent -180 -90 180 90<br> SYMBOLSET "symbols"<br> PROJECTION<br> "init=epsg:4269"<br> END<br><br> WEB<br> IMAGEPATH "/var/www/apache2-default/gis_tests/tmp/"<br>
IMAGEURL "/apache2-default/gis_tests/tmp/"<br> TEMPLATE "empty.html"<br> LOG "log"<br> metadata<br> wms_title "us_states"<br> wms_srs "EPSG:4269"<br>
end<br> end<br><br> outputformat<br> name "png"<br> driver "GD/PNG"<br> imagemode "rgba"<br> extension "png"<br> mimetype "image/png"<br> imagemode RGBA<br>
end<br>---------<br><br>Openlayers:<br><br><br> layer = new OpenLayers.Layer.MapServer( "Estados unidos",<br> "<a href="http://192.168.1.100/cgi-bin/mapserv?map=us_states.map">http://192.168.1.100/cgi-bin/mapserv?map=us_states.map</a>",<br>
{layers: 'us_states', 'format':'image/png'});<br> roads = new OpenLayers.Layer.MapServer( "Roads",<br> "<a href="http://192.168.1.100/cgi-bin/mapserv?map=us_states.map">http://192.168.1.100/cgi-bin/mapserv?map=us_states.map</a>",<br>
{layers: 'us_roads',transparent: 'true', 'format':'image/png'}, {isBaseLayer:false});<br> gps = new OpenLayers.Layer.MapServer( "GPS",<br> "<a href="http://192.168.1.100/cgi-bin/mapserv?map=us_states.map">http://192.168.1.100/cgi-bin/mapserv?map=us_states.map</a>",<br>
{layers: 'gps_points', transparent: 'true', 'format':'image/png' }, {isBaseLayer:false});<br><br> roads.setVisibility(false);<br> gps.setVisibility(false);<br>
<br><br><br>Thaks for your help :)<br> <br><br><div class="gmail_quote">On Thu, Jan 29, 2009 at 5:10 PM, Ivan Grcic <span dir="ltr"><<a href="mailto:igrcic@gmail.com">igrcic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hmm what are the layers image type? its has to be PNG/GIF to be transparent...<br>
<br>
i guess u have to add format: 'image/png', to layer options<br>
<div><div></div><div class="Wj3C7c"><br>
On Wed, Jan 28, 2009 at 9:13 PM, Rafael chacón <<a href="mailto:rafaelchacon@gmail.com">rafaelchacon@gmail.com</a>> wrote:<br>
> Hi, the layers are showing as overlays (with baselayer set to false) I'm<br>
> adding some snapshot to show the behavior.<br>
><br>
><br>
><br>
> On Thu, Jan 29, 2009 at 3:31 PM, Ivan Grcic <<a href="mailto:igrcic@gmail.com">igrcic@gmail.com</a>> wrote:<br>
>><br>
>> Hi, check options:<br>
>><br>
>> layer.isBaseLayer(true/false)<br>
>><br>
>> map.setBaseLayer(layer)<br>
>><br>
>> Cheers<br>
>><br>
>> On Wed, Jan 28, 2009 at 8:51 PM, Rafael chacón <<a href="mailto:rafaelchacon@gmail.com">rafaelchacon@gmail.com</a>><br>
>> wrote:<br>
>> > Hi, I have the following layers defined:<br>
>> ><br>
>> > roads = new OpenLayers.Layer.MapServer( "Roads",<br>
>> ><br>
>> > "<a href="http://192.168.1.103/cgi-bin/mapserv?map=us_states.map" target="_blank">http://192.168.1.103/cgi-bin/mapserv?map=us_states.map</a>",<br>
>> > {layers: 'us_roads', transparent:'true'});<br>
>> > gps = new OpenLayers.Layer.MapServer( "GPS",<br>
>> ><br>
>> > "<a href="http://192.168.1.103/cgi-bin/mapserv?map=us_states.map" target="_blank">http://192.168.1.103/cgi-bin/mapserv?map=us_states.map</a>",<br>
>> > {layers: 'gps_points', transparent: 'true'});<br>
>> ><br>
>> > roads.setVisibility(false)<br>
>> > gps.setVisisibility(false)<br>
>> ><br>
>> ><br>
>> > Both layers work, but I have the following behavior: when one of the<br>
>> > layers<br>
>> > is active the other one disappears. Suppose I chose first the roads,<br>
>> > then<br>
>> > it show the roads. Then I select gps, then it shows the gps points but<br>
>> > roads<br>
>> > start to disappear. Any ideas why this happens??<br>
>> ><br>
>> > Thanks in advance.<br>
>> ><br>
>> ><br>
>> > --<br>
>> > Rafael Chacon,<br>
>> ><br>
>> > "El hombre es la medida de todas las cosas". Protagoras<br>
>> > _______________________________________________<br>
>> > Users mailing list<br>
>> > <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
>> > <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Ivan Grcic<br>
><br>
><br>
><br>
> --<br>
> Rafael Chacon,<br>
><br>
> "El hombre es la medida de todas las cosas". Protagoras<br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<font color="#888888">Ivan Grcic<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Rafael Chacon,<br><br>"El hombre es la medida de todas las cosas". Protagoras<br>