[OpenLayers-Users] MapServer OpenLayers Layer fails to load

jeffcopes jcopes at harris.com
Tue Oct 14 17:55:16 EDT 2008


All,

I have three layers I am loading through OpenLayers. One is a raster layer
with two sets of global imagery. That is being created as an
"OpenLayers.Layer.MapServer" object. This layer loads fine. Another layer
"rivers" is a vector layer and is created as an "OpenLayers.Layer.WMS"
object; it loads fine also. The remaining vector layers ("cities" and
"countries" do not load, even their mapfiles are from the same mapfile
template, their metadata is nearly identical, and their OpenLayers layer
definitions and MapServer layer definitions are similar. The results are the
same regardless of the order of the object creation and layer adding to the
map. I also know the mapfiles are seen because when I make these layers the
only layers, the result is a gray background, and when I munge the mapfile
names, I get pink tiles.

Both vector layers load when added to the "OpenLayers.Layer.MapServer"
object by appending the layer definition to the WMS map call, so I am
working under the assumption the layer definitions are OK. Where should I
begin troubleshooting this problem?

Here is the OpenLayers application:

        map = new OpenLayers.Map('map',options );
        var landsat =
           new OpenLayers.Layer.MapServer("LandSat",
               "http://dnocc8067:8090/cgi-bin/harrismaps?map="
              +
"/usr/local/mapserver/www/htdocs/maps/world_highres_experimental.map"
              + "&layer=blue_marble_world"
              + "&layer=landsat"
              ,{layers: "blue_marble_world,landsat"}
              ,{'displayInLayerSwitcher':"false"}
         );

        var countries =
           new OpenLayers.Layer.WMS("Country Borders",
               "http://dnocc8067:8090/cgi-bin/harrismaps?map="
              + "/usr/local/mapserver/www/htdocs/maps/countries.map"
              ,{layers: "countries", 'isBaseLayer': "false", transparent:
"true"});

        var rivers =
           new OpenLayers.Layer.WMS("Rivers",
               "http://dnocc8067:8090/cgi-bin/harrismaps?map="
              + "/usr/local/mapserver/www/htdocs/maps/rivers.map"
              ,{layers: "rivers", 'isBaseLayer': "false", transparent:
"true"});

        var cities =
           new OpenLayers.Layer.WMS("Cities",
               "http://dnocc8067:8090/cgi-bin/harrismaps?map="
              + "/usr/local/mapserver/www/htdocs/maps/cities.map"
              ,{layers: "largecities,cities", 'isBaseLayer': "false",
transparent: "true"});

         map.addLayer(landsat);
         map.addLayer(countries);
         map.addLayer(rivers);
         map.addLayer(cities);
         countries.setVisibility(false);
         rivers.setVisibility(false);
         cities.setVisibility(false);


Thanks,

Jeff
-- 
View this message in context: http://www.nabble.com/MapServer-OpenLayers-Layer-fails-to-load-tp19982976p19982976.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list