if( object instanceof LayerPointInfo ){
LayerPointInfo info=(LayerPointInfo) object;
layer = info.getLayer();
}
if (object instanceof CoveragePointInfo) {
CoveragePointInfo info = (CoveragePointInfo) object;
layer = info.getLayer();
}
if( object instanceof AdaptableFeature ){
AdaptableFeature feature=(AdaptableFeature) object;
layer=(ILayer) feature.getAdapter(ILayer.class);
}