[OpenLayers-Dev] WorldWind cache proposal

Andrew Larcombe andrew at andrewlarcombe.co.uk
Fri Nov 2 17:47:22 EDT 2007


On 2 Nov 2007, at 18:06, Tim Schaub wrote:

> Basically I'm saying I don't think you should modify the WorldWind  
> layer
>   so that it switches between URL path generation and URL query string
> generation for tile requests.
>
> In a perfect world (3.0), we'd probably have a URL layer.  You could
> modify this layer with custom path and query string behaviors.  The  
> way
> things are, you could create a WorldWindCache layer.
>
> If you want your map to switch between remote and local data at some
> resolution, then use two layers.
>
> I know this doesn't treat the case where you want to switch behavior
> (from path based to query string based) given the availability of an
> individual tile with the first behavior (I'd just use img.onerror  
> here).
>   This is getting pretty custom - and I'm not the one to say how
> appropriate it is here (since I don't really have experience with the
> WorldWind layer).


Hi Tim,

Thanks for the feedback. I see where you're coming from, and I did  
consider this approach but backed out in preference for the proposed  
solution. The reason for that is that (from my reading of the code  
and architecture) the transport mechanism of the tile retrieval  
(HTTP, local file, etc) etc should not take primacy over the logic  
determining how to request a tile. So rather that seeing class  
WorldWind as a class for retrieving WorldWind tiles over HTTP and  
WorldWindCache as a class to retrieve the same tiles from a local  
cache - I thought that WorldWind should represent the single place  
where the logic for retrieval of WorldWind tiles should reside  
irrespective of the method of retrieval. Otherwise surely we'll end  
up creating a new class for each retrieval mechanism which means  
duplicating code which IMO is not ideal. The WorldWind class should  
be the only place which contains the code and variables (LZD, zoom  
levels, URI etc) required for determining which tile should be  
requested.

Not sure whether that's confused or clarified, but it might help to  
explain the design decision.

Cheers,

Andrew

-- 
Andrew Larcombe
Freelance Geospatial, Database & Web Programming

web: http://www.andrewlarcombe.co.uk
email: andrew at andrewlarcombe.co.uk
icq: 306690163







More information about the Dev mailing list