On Friday, November 5, 2010, <[email protected]> wrote: > > > Hi, > > I'm using OL 2.10 > > I created a simple app that works on > IE8 and FF, but the map doesn'T show up in IE6 and the layer switcher is > there but empty. The pan/zoom controls appear. > > I need it to work on IE6. > > > The error I get is > > Message : 'null' is null or not > an object > > Ligne : 1439 > > Caractère : 598 > > Code : 0 > > URI : .../framework/OpenLayers-2.10/OpenLayers.js > > > > I could'nt see why yet. > > Any idea on what could be the problem? > > thank you for your help! > > Steve > > > var map; > > var mapOptions = > > { > > projection: > new OpenLayers.Projection("EPSG:900913"), > > displayProjection: > new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord > lat long > > units: > "m", > > maxResolution: > 156543.0339, > > maxExtent: > new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), > > controls: > [], //on les définit plus loin > > numZoomLevels: > 20 > > }; > > > map = new OpenLayers.Map('divMap', mapOptions); > > > //control > > var navControl = new OpenLayers.Control.Navigation({ > > type: > OpenLayers.Control.TYPE_TOGGLE, > > zoomWheelEnabled: > true > > }); > > map.addControl(navControl); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.addControl(new OpenLayers.Control.PanZoom()); > > > var carteMSP = new OpenLayers.Layer.WMS( > > > > "RSS", > > > > szMapServURL, > > > > {layers: 'RSS', transparent: "true", > format:"image/gif"}, > > > > {isBaseLayer: true, visibility: false, singleTile:true, > displayInLayerSwitcher:true} > > > ); > > > > map.addLayer(carteMSP); > > var point = new OpenLayers.Geometry.Point(-8159805.6260253, > 5800653.23107); > > map.setCenter(new OpenLayers.LonLat(point.x, > point.y), 7);
Weird! What if you set visibility to true in the layer options? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
