[OpenLayers-Users] OpenLayers.Layer.TMS requesting too many tiles?

Brian Walawender Brian.Walawender at noaa.gov
Tue Feb 17 11:46:51 EST 2009


Ok so I should be using mod_python instead of cgi correct?  I added the
'buffer': 0 to my TMS layer but did not note any improvement.  Why is the
Google Maps call so much faster?  Here is the code snip from it:

var j = 0;
for (var i=radarLayer; i>-1; i--) {
	layer = radar_id + '_n0r_' + j;
      var tile_url = 'http://123.45.67.105/tilecache/tilecache.cgi/1.0.0/' +
layer + '/{Z}/{X}/{Y}.png?type=google'
      overlay[i] = new GTileLayerOverlay(new GTileLayer(null,null,null,{
		tileUrlTemplate: tile_url,
		isPng:true,
		 opacity: radarOpacity
	}));
      map.addOverlay(overlay[i]);
      j++;
}

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On
Behalf Of Christopher Schmidt
Sent: Tuesday, February 17, 2009 10:37 AM
To: Brian Walawender
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] OpenLayers.Layer.TMS requesting too many
tiles?

On Tue, Feb 17, 2009 at 09:57:56AM -0600, Brian Walawender wrote:
> Hello,
> 
> I'm trying to have OpenLayers interact with TileCache similar to the way
the
> Google Maps and GTileLayerOverlay interacts with tilecache.    My Google
> example will load in about 3 seconds (the tiles were already created) and
> requests 55 tiles from the server.  My Openlayers application takes
several
> minutes to load and is requesting about 3 times as many tiles.  It also
> spawns numerous Python processes on the servers and max out the CPU.  

1. Don't use TileCache as CGI if you care in the slightest about
performance. Really. I mean it.

2. set 'buffer': 0 as an option on your TMS layer.

Regards,
-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list