Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Diplicated layers in the map


UDIG lets to add many layers from the same georesource (shapefile , e.g.).
It is a general behavior from the user's point of view. But UDIG has wrong
implementation to handle this behavior at some points. Different LayerImpl
instances have the same ID (that is based actually on IGeoResource
identifier and represented by URL object). This may cause wrong handling of
layers in application, at least one place is labels rendering by GeoTools
LabelCache improvement. LabelCache implementation is based on String-typed
layers IDs and UDIG uses String represention of URL object as layer ID. So,
different layer instance have the same IDs that breaks good workflow of
labels rendering.

1) The user should have an option to block adding new layer to the map that
already contains a layer with the same georesource. Only one layer from the
same georesource may be created in context of the map. This option is
configurable through preferences to override automatically the whole
applicaton behavior for different products. Good place to implement
"filtering" of georesources being added as layers to the map is
ApplicatioGIS.addLayersToMap().  This is not critical, but an option for
automatic product customization.

2)Layer ID (returned by getID()) is more about matching to the georesource.
What should be a String-typed layer ID that identifies a layer as an object?
A kind of lightweight unique identifier to be used in cases like
LabelCache.startLayer(String layerID) ?


Vitali.

P.S. Create JIRA tasks?



Back to the top