[OpenLayers-Users] map doesn't draw when width expands beyond 1000px (aprox)...

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Dec 8 02:48:35 EST 2006


John,

Mapserver by default can only handle images of 2048 by 2048 pixels. Probably
OpenLayers is requesting something larger.

I ran into this as well, you could solve it by either a recompile of your
Mapserver, or you can change your OpenLayers code to use a ratio of 1.

            map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldPOI",
                "http://www2.dmsolutions.ca/cgi-bin/mswms_world?", {layers:
'WorldPOI', 'format':'image/png', 'transparent':'true'}, {'ratio':1,
isBaseLayer: false} );

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: John Cole <john.cole at uai.com>
Naar: 'users at openlayers.org' <users at openlayers.org>
Onderwerp: [OpenLayers-Users] map doesn't draw when width expands beyond
1000px (aprox)...
Datum: 07/12/06 21:06

> I've created a sample page using OpenLayers, but have run into a strange
> issue.  When you resize the image greater than about 1000 pixels wide, the
> mapserver layer doesn't draw anymore.  Another layer (WMS) continues to
draw
> ok (in this cae the Nexrad layer from one of the demos).
> 
> Here is what I have:
> 
> var map, layer;
> 
>         function init(){
>             map = new OpenLayers.Map( $('map') );
>             layer = new OpenLayers.Layer.WMS.Untiled( &quot;OpenLayers
WMS&quot;, 
>  
>
&quot;http://ostest4.uai.int/cgi-bin/mapserv.exe?map=/mapserver/madison/mainutm.m
> ap&amp;&quot;, {layers: 'bound,hydro,roads,landmark'} );
>             map.addLayer(layer);
> 
> 			map.setCenter(new OpenLayers.LonLat(-86.5, 34.75),
> 11);
> 
>             map.addControl( new OpenLayers.Control.LayerSwitcher() );
>         }
> 
> Thanks,
> 
> John Cole
> This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender. This
message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 






More information about the Users mailing list