When I set definition expression of a county layer to countyLayer.setDefinitionExpression("STATE_FIPS = '" + fips + "'");
only the counties in state with FIPS as fips
are rendered.Now, what I need to do is render all the blocks inside a county of a state. Block group layer has STATE_FIPS (length 2 ) and CNTY_FIPS (length 3). If I set definition expression to blockLayer.setDefinitionExpression("CNTY_FIPS = '" + countyFips + "'");
, this will render blocks inside county with CNTY_FIPS = countyFips. But, since CNTY_FIPS is of length 3 and this expression matches for county in every state and blocks inside all the counties of the states are rendered.I am trying or rather what I need to do is blockLayer.setDefinitionExpression("CNTY_FIPS = '" + countyFips + "' AND STATE_FIPS = '" + fips + "'");
This way only blocks inside a state with STATE_FIPS = fips will be renedered. But combining expression with AND does not work.Any help would be apreciated. Thanks in advance.