[OpenLayers-Dev] tile problem

Lars Schrader lars.schrader at web.de
Wed Feb 7 04:47:31 EST 2007


Am Dienstag, 6. Februar 2007 17:53 schrieben Sie:
> On Tue, Feb 06, 2007 at 05:21:15PM +0100, Lars Schrader wrote:
> > Hello,
> >
> > how can I change OpenLayers to get only one tile?
> > I have changed the following things:
> >
> > buffer=0  under ../OpenLayers/lib/OpenLayers/Layer/Grid.js
> >
> > OpenLayers.Map.TILE_WIDTH = 640; to the viewSize of the map
> > OpenLayers.Map.TILE_HEIGHT =320; to the viewSize of the map
> > under ../OpenLayers/lib/OpenLayers/Map.js
> >
> > Now I get 4 tiles, because the function _initTiles under Grid.js
> > don?t create less than 4 tiles.
> >
> > Is there any easy way to solve the problem, or is it necessary to
> > change the function?
>
> This should be fixed/changed in the latest SVN. Are you using SVN, or an
> older release?
>
> Regards,

Hello Christopher,

thanks for your answer. Today I checked out a workspace copy from the svn.
But the problem is the same. Untile yesterday I used OpenLayers-2.3-rc2.
In the OpenLayers directory I find a file called ../Layer/WMS/Untiled.js. 
Should these file be used for my problem? How can I 
use ../Layer/WMS/Untiled.js instead of ../Layer/WMS.js?
I have inplemeted the WMS-Service by the following code.

 function init(){
            map = new OpenLayers.Map( $('map') , 
            { controls: [] , 'numZoomLevels':10});
                               
            dops = new OpenLayers.Layer.WMS( 
            		"Dops"
            		, "http://x.x.x.x/cgi-bin/mapserv?"
            		, {map: '/srv/www/mapserver/xxx/dop/dop.map'
			, layers:'Dops', format:'image/jpeg'}
       			, {maxExtent: new 
                           OpenLayers.Bounds(minx,miny,maxx,maxy)
			, maxResolution: 'auto', projection:"EPSG:31467" });
            dops.setVisibility(true); 
            dops.addOptions({isBaseLayer: true});
            map.addLayer(dops);

Wrong way?

Greetings, Lars





More information about the Dev mailing list