Re: NetworkMapSource and ChamplainCache change proposal

On Tue, Nov 24, 2009 at 12:22 AM, Jiří Techet <techet gmail com> wrote:
On Mon, Nov 23, 2009 at 01:32, Jiří Techet <techet gmail com> wrote:
Just looking at what I have written I think I wasn't quite right here
- even when storing the tile we should do it in the same order as when
loading it, so

cache1 --> cache2 --> NetworkMapSource

For multiple map sources and caches, like

cache1 --> cache2 --> NetworkMapSource1 --> cache3 --> cache4 -->

NetworkMapSource1 will start storing into cache1 and NetworkMapSource2
into cache3.

Actually, the more I look at how things get complicated and possibly
confusing, I would suggest that we should use "caches first, map
sources second" only strategy and not to interleave caches and map
sources. This will also make the interface of ChamplainView simpler
and less confusing.
This is starting to become the Gstreamer of maps, we're just missing a system bus to pass messages ;) 

Keeping the API simpler is definitely a win. I think that most users are expecting to create a MapView and to set a single MapSource. Most of them don't care about the cache as long as it is well implemented for them and fast enough.

I think that providing different cache implementations is already a nice feature. Having the cache at the View level will also be a nice addition. Being able to chain multiple caches and multiple views (cache->map->cache->map, etc) will probably be rarely used, perhaps this feature could wait for a future release.

You might have a point when you say that we should only allow caches to be chained together and map sources with map sources. Besides if the object hierarchy is done right (by this I mean that Caches and MapSources share a comon API) an advanced user should be able to create a custom pipeline of caches/maps in any order as long as the user maintains its own pipeline.

This means that we can still provide the high level functions that give us the basic usage (get_cache/get_view), the advanced functions (clear_cache/append_cache/...) and maybe let the users build an advanced pipeline that they will maintain (optional).

Jiří: neboj sa ja nie som katalan. Ale ako vidiš nehovorim po Česky ale po Slovensky (trošku), ale myslim ze rozumieš :)
Pekny hovoriš po spanielšky.
Emmanuel Rodriguez

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]