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

Arjen de Korte arjendk at gmx.net
Tue Jun 5 04:08:27 EDT 2007


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!

So this seems to be a transparency issue. Does anybody have experience with this?

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!
} );

Barend, thanks for your reply.

You said:
> First, I am not suprised
> > map.setCenter(new OpenLayers.LonLat(543443,255213), 7);
> doesn't work, as RD does not use latlon, but meters in a cartesian system.

You certainly have a point there, but this seems to be more an issue of function naming; it seems LonLat can be any (x, y) point.

Best regards,
Arjen.



More information about the Users mailing list