[OpenLayers-Users] JavaScript error: bounds has no properties
Arjen de Korte
arjendk at gmx.net
Mon Jun 4 09:15:58 EDT 2007
Tom, list,
Thanks for your comments.
I've tweaked some of the options, like adding and removing the
isBaseLayer and resolutions options. I keep getting the same error.
Any other suggestions?
Arjen.
On Mon, 4 Jun 2007 13:17:37 +0100, "Tom" <tom at ukbassline.co.uk> said:
> Arjen,
>
> This is what I use for British National Grid and it works fine.
>
>
> <script type="text/javascript">
> var map;
> function init()
> {
> var options =
> {isBaseLayer:true,resolutions:[72,36,18,9.6,4.8,2.4,1.2,0.6,
> 0.3,0.15,0.125], maxExtent:new OpenLayers.Bounds(0,0,2000000,2000000),
> maxResolution:'auto', units:'meters', projection:'EPSG:27700',
> controls:[]};
>
> map = new OpenLayers.Map( $('map'), options );
> var layer0= new OpenLayers.Layer.WMS('Mastermap', '
> http://somewhere/script.asp?',{layers:'topo_area,carto_text<http://somewhere/script.asp?%27,%7Blayers:%27topo_area,carto_text>',
> format:'image/jpeg'});
>
> map.addLayers(layer0);
>
> map.setCenter(new OpenLayers.LonLat(543443,255213), 7);
> }
> </script>
>
> cheers,
>
> Tom
>
More information about the Users
mailing list