Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #527 - 3.4: Queryable not configurable #211

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public static MapOptions parseLayerOptions( LayerOptionsType cfg ) {
}
if ( cfg.getFeatureInfo() != null && cfg.getFeatureInfo().isEnabled() ) {
rad = cfg.getFeatureInfo().getPixelRadius().intValue();
} else if ( cfg.getFeatureInfo() != null && !cfg.getFeatureInfo().isEnabled() ) {
rad = 0;
} else if ( cfg.getFeatureInfoRadius() != null ) {
rad = cfg.getFeatureInfoRadius();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ public void getMap( org.deegree.protocol.wms.ops.GetMap gm, List<String> headers
private List<LayerData> checkStyleValidAndBuildLayerDataList( org.deegree.protocol.wms.ops.GetMap gm,
List<String> headers, double scale,
ListIterator<LayerQuery> queryIter )
throws OWSException {
throws OWSException {
List<LayerData> layerDataList = new ArrayList<LayerData>();
for ( LayerRef lr : gm.getLayers() ) {
LayerQuery query = queryIter.next();
List<Layer> layers = getAllLayers( themeMap.get( lr.getName() ) );
assertStyleApplicableForAtLeastOneLayer( layers, query.getStyle(), lr.getName() );
for ( org.deegree.layer.Layer layer : layers ) {
if ( layer.getMetadata().getScaleDenominators().first > scale
|| layer.getMetadata().getScaleDenominators().second < scale ) {
|| layer.getMetadata().getScaleDenominators().second < scale ) {
continue;
}
if ( layer.isStyleApplicable( query.getStyle() ) ) {
Expand Down Expand Up @@ -283,7 +283,7 @@ public FeatureCollection getFeatures( org.deegree.protocol.wms.ops.GetFeatureInf
LayerQuery query = queryIter.next();
for ( org.deegree.layer.Layer l : Themes.getAllLayers( themeMap.get( n.getName() ) ) ) {
if ( l.getMetadata().getScaleDenominators().first > scale
|| l.getMetadata().getScaleDenominators().second < scale ) {
|| l.getMetadata().getScaleDenominators().second < scale ) {
continue;
}
list.add( l.infoQuery( query, headers ) );
Expand Down Expand Up @@ -321,16 +321,21 @@ private List<LayerQuery> prepareGetFeatures( org.deegree.protocol.wms.ops.GetFea
OperatorFilter f = filterItr == null ? null : filterItr.next();
int layerRadius = 0;
for ( org.deegree.layer.Layer l : Themes.getAllLayers( themeMap.get( lr.getName() ) ) ) {
if ( l.getMetadata().getMapOptions() != null
&& l.getMetadata().getMapOptions().getFeatureInfoRadius() != 1 ) {
layerRadius = l.getMetadata().getMapOptions().getFeatureInfoRadius();
if ( l.getMetadata().getMapOptions().getFeatureInfoRadius() == 0 ) {
return null;
} else {
layerRadius = defaultLayerOptions.getFeatureInfoRadius();
if ( l.getMetadata().getMapOptions() != null
&& l.getMetadata().getMapOptions().getFeatureInfoRadius() != 1 ) {
layerRadius = l.getMetadata().getMapOptions().getFeatureInfoRadius();
} else {
layerRadius = defaultLayerOptions.getFeatureInfoRadius();
}
}
}
LayerQuery query = new LayerQuery( gfi.getEnvelope(), gfi.getWidth(), gfi.getHeight(), gfi.getX(),
gfi.getY(), gfi.getFeatureCount(), f, sr, gfi.getParameterMap(),
gfi.getDimensions(), new MapOptionsMaps(), gfi.getEnvelope(), layerRadius );
gfi.getDimensions(), new MapOptionsMaps(), gfi.getEnvelope(),
layerRadius );
queries.add( query );
}
return queries;
Expand Down