From: Cameron S. <csh...@bi...> - 2002-08-08 11:41:07
|
Great to see some discussion on this issue. I agree with most of what James has to say > How does the following sound: > > DataSource : Object from which features can be pulled, backed by > file/DB/memory/WFS > Layer : Holds a DataSouce and a Style > Map : A set of Layers, in a specific order, with the ability to switch > layers off or change order I'd prefer to call this "LayerList" - in keeping with the class already by that name. > Renderer : Holds a reference to a map and renders any AOI on request. Also holds reference to AOI_Model. Renderer keeps a list of features for it's AoI and only refreshes the list when either: * AoI changed event happens or * A layer changed event happens (causing only one layer to reload and repaint) * A layerList changed event happens (eg a layer is deleted from the view) MapPane: Contains Tool, and Renderer and various models. > >My main issue is that the difference between Map and Renderer is not > >obvious to me at this time (in the same way that the difference between > >FeatureCollection and DataSource seem very small to me). How are we > >suppose to implements caching in Renderer? If we allow it by the addition > >of "set" methods, then what would be the difference between a Map and a > >Renderer? I think the problem with merging Map and Renderer comes about when you try to create 2 views (displays) of the same data. * If you want a main map with 5 layers, and a locator map with one basemap, then you need to LayerList classes, but one AoI class. * If you want 2 maps viewing the same data, but zooming independantly, then you need one LayerList class, and 2 AoI classes. * And so I could go on with different use cases. Attached is a rough class diagram of the key classes I think are required. -- Cameron Shorter http://cameron.shorter.net Open Source Developer http://mapbuilder.sourceforge.net Senior Software Engineer http://www.adi-limited.com/ |