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

WMS dimension filter for tileindex #5209

Closed
Closed
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
10 changes: 10 additions & 0 deletions mapwms.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ int msWMSApplyDimensionLayer(layerObj *lp, const char *item, char *value, int fo
{
int result = MS_FALSE;
char *pszExpression=NULL;
int tlpindex = -1;

if (lp && item && value) {
/*for the value, we support descrete values (2005) */
Expand All @@ -693,8 +694,17 @@ int msWMSApplyDimensionLayer(layerObj *lp, const char *item, char *value, int fo
pszExpression = FLTGetExpressionForValuesRanges(lp, (char *)item, value, forcecharcter);

if (pszExpression) {
// If tileindex is set, the filter is applied to tileindex too.
if (lp->tileindex && (tlpindex = msGetLayerIndex(lp->map, lp->tileindex)) != -1) {
if(FLTApplyExpressionToLayer((GET_LAYER(lp->map, tlpindex)), pszExpression))
result = MS_TRUE;
else
result = MS_FALSE;
}
if(FLTApplyExpressionToLayer(lp, pszExpression))
result = MS_TRUE;
else
result = MS_FALSE;
msFree(pszExpression);
}
}
Expand Down