[OpenLayers-Users] JavaScript error: bounds has no properties

Christopher Schmidt crschmidt at metacarta.com
Tue Jun 5 07:34:24 EDT 2007


On Tue, Jun 05, 2007 at 10:08:27AM +0200, Arjen de Korte wrote:
> Hi,
> 
> I found out what causes the JavaScript error. If I add "transparent: true" to the layer options, I will get this error. If I remove it, it works. Also, if I set transparent to false, it works!

'transparent':true causes the layer to not be a base layer. If you
change the configuration like so:

 layer = new OpenLayers.Layer.WMS( "VMap0", "http://localhost/mapserver/mapserv.exe?map=c:/Inetpub/test/demo.map&",
 { layers: 'water',
   srs: 'EPSG:28992',
   format: 'image/png',
   transparent: true  // This causes the "bounds has no properties" JS error!
 }, {isBaseLayer: true} );

It should work in the same way. If it doesn't, please send HTML of a
failing example to the list.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list