Sep 3, 2008 at 6:56 PM
Edited Sep 3, 2008 at 6:58 PM
After quite a long time (partially because of project overflow in my "day time job", and partially just waiting for the SharpMap 2.0 to get stabilized) I'm trying to continue the work on WpfSharpMapControls.
However, nothing in life's so simple, so here are my question, answers to which will hopefully speedup some kind of intermediate release of
The questions mainly arise from the following phenomena:
- A general question: when creating a layer using a Provider, whose responsibility is it to call the provider.Open () ? is it done automatically the presenter (or even not automatically, but the responsibility is on the presenter?).
- More Specifically how it should be done in the case of ShapeFile provider?
- Is the ShapeFile provider (in v2, i.e. the one in the separate assembly) stable enough to start experimenting with it?
These are quite important to me, since my "real-life" test scenarios to the WPF control usually use shp files, and I whold like to switch to the mew GeoAPI interfaces ASAP.
- I wasn't able to use the ShapFile provider, since if I open it (synchronously), after the initialization of the layer connected to it, I got exception stating that there cannot be only one DataReader. If I don't open it, and operation on the map (e.g. zoon)
throws "an attempt to ... was made on a closed provider".
- Is the Close() method on the provider semantically equivalent to Dispose (as it is recomended in numerous guidelines) or is it not? More specifically is a provider remains in functional state after calling close, and is it legal to call on it open() later?
(if yes - then it is not very consistent with dispose behavior).
- From what I understand from the code - the providers do call dispose on close, and do keep flag indicating that it is disposed, but this flag is being used quite rarely check in other methods, which means I can call close, and then call other methods on
the closed object, without any errors thrown. Is it by design?