Dear all, maybe a simple question. but i didn“t find a way right now. I would like to put all my layer definitions in a single file that could be edited easily. This file should be read by the map definiton. A hint would be very nice.Thank you!
Here is a code example: //create a mapPanel that will hold the map mapPanel = new GeoExt.MapPanel({ border: true, //units: 'm', region: "center", zoom: 5, items: [{ xtype: "gx_zoomslider", vertical: true, height: 200, x: 10, y: 20, plugins: new GeoExt.ZoomSliderTip() }], map: new OpenLayers.Map({ div: "map", allOverlays: false, projection: new OpenLayers.Projection("EPSG:900913"), center: [848900, 6793335], maxResolution: 78271.51695, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.MousePosition(), //new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.KeyboardDefaults() ] }), //Create Layers *This part should be in a single file* layers: [ new OpenLayers.Layer.OSM(), new OpenLayers.Layer.WMS("Global Imagery", "http://maps.opengeo.org/geowebcache/service/wms", { layers: "bluemarble", isBaseLayer: true }, { buffer: 0, visibility: true } ), new OpenLayers.Layer("Keine_Grundkarte", {'opacity': 1, 'isBaseLayer': true}), new OpenLayers.Layer.WMS("TrueColor", "http://giv-warrlich:8080/geoserver/wms", {layers: 'wadi:TrueColor', format: 'image/png', transparent: true}, {buffer: 2, visibility: false, isBaseLayer: false} ) ] }); //End Map Panel -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-read-OpenLayers-Layer-Definitions-from-file-tp5041476.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users