// Make a standard JSON based dynamic layer
return new DynamicIndexReader((LayerTreeIndexReader) parent.index, query);
} else {
// Make a CQL based dynamic layer
try {
return new CQLIndexReader((LayerTreeIndexReader) parent.index, this, query);
} catch (CQLException e) {
throw new SpatialDatabaseException("Error while creating CQL based DynamicLayer", e);
}
}
} else {