[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Feature Caching
|
It is a confusing class! ;)
The ShowViewInterceptor is exactly right for what I'm doing so I've
changed everything over to use that, rather than filtering at the
IGeoResource level - it definitely keeps everything much cleaner.
Unfortunately, it still suffers from the same problem. Someone somewhere
is caching things so that, in order to see the filter change, you have
to remove the layer and add it back in again. It's now persisting the
original Filter (i.e. the one in place when the layer was first created)
as well, so even closing the application down and opening it up again
doesn't refresh the data! I need to dig more...
The cache doesn't seem to be accessible from outside of the
LayerResource class - I think everything's in ResourceCacheInterceptor
instance which is held in the interceptors collection. Is there any way
of clearing it or stopping it from caching the FeatureStore? Maybe I'm
looking in the wrong place...
Thanks for the pointers anyway.
Jesse Eichar wrote:
Hi Dave,
Take a look at LayerResource. That could be related to your issue.
Or maybe not it is a confusing class :). The idea is that
LayerResource is a decorator over the IGeoResource from the catalog.
It provides a small framework that does 2 things.
1. Provides targets for interceptor which allow a developer to do
things like override the CRS returned by the IGeoResource... Or apply
filters to an IGeoResource. Related to that there is actually an
existing Interceptor called ShowViewInterceptor which takes a filter
from the StyleBlackboard (it also checks the Layer Blackboard) and
when a FeatureSource is requested calls getView on the Datastore and
returns that FeatureSource instead of the one returned by the
IGeoResource. Sounds like that could be of interest to you.
2. Caches items that are resolved from the IGeoResource so the same
FeatureSource is returned each time. The reason the same
FeatureSource was for events and for Transactions to be consistent. I
wouldn like to review that and see if it is still necessary because
caching (like you are finding) can be annoying.
Jesse
On Mon, Aug 24, 2009 at 12:28 PM, Dave S-B
<dev-lists@xxxxxxxxxxxxxxxxxxxxx
<mailto:dev-lists@xxxxxxxxxxxxxxxxxxxxx>> wrote:
...and I'm using a MySql DataStore to get the data...
Dave S-B wrote:
I'm trying to work through a problem I'm having with a custom
GeoResource and I could do with some pointers.
In our application, users can select global named "datasets"
to work with for their current session. Amongst a load of
other things, this includes data filtering. So, from my custom
IGeoResource's getFeatureSource() method, I'm returning a
feature source with a filter based on the global dataset
rules. This is all working fine when you first open a map or
add this particular layer - it picks up the correct results
based on the current datasets. But, if the user changes their
dataset selection, no amount of map refreshing or opening and
closing of maps will draw the correct data *even though* the
getFeatureSource() method *is* returning a FeatureSource with
the correct Query/Filter (it's just an FID filter). The only
way to see the refreshed data is to shut down the application
and re-open it.
I'm having trouble working out where things are being cached
because getFeatureSource() is getting called on every map
refresh/pan/zoom so something is obviously looking for fresh
information.
Any ideas how I can get the map to refresh properly? I'm using
1.2M5 SDK at the moment..
Many Thanks
Dave S-B
New album - "Dark" - out now! Check it out on
www.myspace.com/davesbsounds <http://www.myspace.com/davesbsounds>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com <http://www.avg.com> Version:
8.5.409 / Virus Database: 270.13.65/2322 - Release Date:
08/23/09 18:03:00
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.65/2322 - Release Date: 08/23/09 18:03:00