On Thu, Jun 10, 2010 at 1:40 PM, Rahn Hanno (rahn) <r...@zhaw.ch> wrote: > Hi, > > I try to make it, but it doesn't work. My layer looks like this: > > var zielrichtung = new OpenLayers.Layer.WMS("Zielrichtung",urlArray, > > {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"}, > {singleTile: true, ratio:1}, > "visibilitychanged": function() { > alert("visibility changed"); > } > ); > > zielrichtung.setIsBaseLayer(false); > map.addLayer(zielrichtung); > zielrichtung.setVisibility(false); > > var sld_zRichtung = url_ziel+"indikator="+indikator1; > zielrichtung.mergeNewParams({SLD:sld_zRichtung}); > > But it doesn't work. But where is my mistake. I don't know what to do now. > Please can somebody give me a tip?
Try this: var zielrichtung = new OpenLayers.Layer.WMS("Zielrichtung",urlArray, {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"}, {singleTile: true, ratio:1, eventListeners: { "visibilitychanged": function() { alert("visibility changed"); } }}); -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users