[OpenLayers-Users] OpenLayers vs Mapserver layer rendering order

Ted Spradley tspradley at snoogems.com
Tue Dec 8 17:24:44 EST 2009


Hi all!

My OL map layer renders my MapServer layers not in the (expected) order of
the map file.

The MapServer layer that I would like 'last' or 'on top' is 'zip_codes'.  I
have placed it first, various places in the middle, and last in the
OpenLayer addLayers call and it doesn't seem to make a difference.  The MS
layers 'tl_edges_..' are always drawn on top of 'zip_codes'.  In my map
file, 'zip_codes' is last and drawn last when rendered directly from
MapServer.

How does the OpenLayers rendering of layer order differ from calling
MapServer directly in the url?

Thanks in advance!
Ted S.

/* Openlayers Layer */

var tl_us_county_48201 = new OpenLayers.Layer.WMS( "Counties",
  "http://url.com/cgi-bin/mapserv?", {
  map: "/path/to/cad.map",
  maxExtent: new 
 
OpenLayers.Bounds(2928849.796040,13748390.427723,3269286.273267,13992542.754455),
  numZoomLevels: 20, isBaseLayer: "true",
  projection: new OpenLayers.Projection("EPSG:2278"),
  maxResolution: "auto", maxScale: 70000,
  units: "ft", 'layers':
"zip_codes,countries,tl_edges_3,tl_edges_2,tl_edges_1,tl_edges_0,tl_edges_00,parcels,row_annotation"}
      );
-- 
View this message in context: http://n2.nabble.com/OpenLayers-vs-Mapserver-layer-rendering-order-tp4135864p4135864.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list