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

Curtis W. Ruck ruckc at yahoo.com
Thu Dec 7 19:26:23 EST 2006


The reason for this is that your WMS server or wherever you are getting the data will not draw layers larger than 2048px wide.  OpenLayers.Layer.WMS.Untiled pulls down an image 4x the size of the viewport.  (i.e. viewport is 1000x800 than the requested image is 2000x1600.)  I know mapserver's default max width is 2048.  If you can recompile your mapserver binaries then you can change that default max width.  Another solution is to use OpenLayers.Layer.WMS (not untiled) so it pulls smaller images from the WMS server.

Curtis

----- Original Message ----
From: John Cole <john.cole at uai.com>
To: "users at openlayers.org" <users at openlayers.org>
Sent: Thursday, December 7, 2006 5:04:13 PM
Subject: [OpenLayers-Users] map doesn't draw when width expands beyond 1000px (aprox)...

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( "OpenLayers WMS", 
 
"http://ostest4.uai.int/cgi-bin/mapserv.exe?map=/mapserver/madison/mainutm.m
ap&", {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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061207/63ca31f1/attachment.html


More information about the Users mailing list