[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Selection filter changed
|
Is they layer you are selecting on the selected layer? If it is not
it may not be shown. This might also be a bug. Could you make sure
that the layer is the selected layer and if it is not highlight then
add a bug report.
Does the highlight appear if you manually re-render the map?
Jesse
On 25-Apr-06, at 2:32 AM, Mark Presling wrote:
Hi all,
Something else has changed since my last source update to revision
19235 (20/04/06). I used to use LayerImpl.setFilter() to highlight
a feature on the map using a FID filter. Now this doesn't seem to
work correctly. It just doesn't do anything at all and I can't seem
to track down why.
Has anyone changed something to do with the selection stuff? Should
I be doing this a new way?
FYI, here is the code I am using to do this:
IMap map = ApplicationGIS.getActiveMap();
LayerImpl eventLayer = (LayerImpl) getLayerByName
(LAYER_ROADEVENT, map); //My own method
FilterFactory filterFactory = new FilterFactoryImpl();
CompareFilter filter = null;
try {
FeatureSource featureSource = (FeatureSource)
eventLayer.getResource(
FeatureSource.class, null);
filter = filterFactory.createCompareFilter
(CompareFilter.COMPARE_EQUALS);
FeatureType featureType = featureSource.getFeatures
().getSchema();
filter.addLeftValue
(filterFactory.createAttributeExpression(featureType, "roadeventid"));
filter.addRightValue
(filterFactory.createLiteralExpression(id));
eventLayer.setFilter(filter);
} catch (Exception e) {
e.printStackTrace();
}
Thanks,
Mark
--
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.
<mark.vcf>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel