[OpenLayers-Users] MapServer OpenLayers Layer fails to load

Arnd Wippermann arnd.wippermann at web.de
Wed Oct 15 13:59:53 EDT 2008


I don't think, it's an issue with OpenLayers, but with the projection in the
mapfile.

Arnd Wippermann 

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von jeffcopes
Gesendet: Dienstag, 14. Oktober 2008 23:55
An: users at openlayers.org
Betreff: [OpenLayers-Users] MapServer OpenLayers Layer fails to load


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-tp19982976p19
982976.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list