Select to view content in your preferred language

problem in query not able to perform distinct value and outfield in query

676
0
12-16-2019 06:23 PM
AnkurPandey
New Contributor

Hello! I am developing an app with ArcGIS Runtime SDK for Android 100.6.0 I am using Android Studio. 

i will perform query but not able to perform Return Distinct Values: and Out Fields: both together in query. As i see in web query easily perform query there is option for Return Distinct Values: and Out Fields: What is possiblity from android.

Please help me out. I will share code 

QueryParameters queryParameters = new QueryParameters();

queryParameters.setWhereClause(where);

queryParameters.setReturnGeometry(isGeometry);

// set all outfields
List<String> outFields = new ArrayList<>();
outFields.add("*");

queryParameters.setSpatialRelationship(QueryParameters.SpatialRelationship.INTERSECTS);
ListenableFuture<FeatureQueryResult> commentQueryResultFuture = featureTable
        .populateFromServiceAsync(queryParameters, true, outFields);

commentQueryResultFuture.addDoneListener(() -> {
    try {
        FeatureQueryResult featureQueryResult = commentQueryResultFuture.get();
        featureQueryResultListener.onResult(featureQueryResult, status);
    } catch (InterruptedException | ExecutionException e) {
        featureQueryResultListener.onFailure(status, e.getMessage());
    }
});




Thanks

0 Kudos
0 Replies