I am having trouble selecting features from an offline geodatabase.
I am following the 'Select Features' sample. I have switched all that parameters to work off of a local gdb. So I am passing in: QueryParameter() and SelectionMode. Instead of: Query() and SELECTION_METHOD. I have also added a .setSelectionColor & .setSelectionColorWidth to the featureLayers in my map. However, nothing seems to get selected after I create the envelope and release.
Here is some Sample
FeatureLayer fLayer = null;
//added to Mapview in onCreate
localGdb = new Geodatabase(FeatureInformation.getInstance().activeGeodatabasePathString);
for (GeodatabaseFeatureTable gdbFeatureTable : localGdb.getGeodatabaseTables()) {
if (gdbFeatureTable.hasGeometry()) {
fLayer = new FeatureLayer(gdbFeatureTable);
fLayer.setSelectionColor(12828800);
fLayer.setSelectionColorWidth(30);
mMapView.addLayer(fLayer);
}
}
localGdb.dispose();
//This is inside of onDragPointerUp just like Select Features sample
QueryParameters q = new QueryParameters();
//q.setWhere("FEATURE='Fire'");
q.setReturnGeometry(true);
q.setInSpatialReference(mMapView.getSpatialReference());
q.setGeometry(g.getGeometry());
q.setSpatialRelationship(SpatialRelationship.INTERSECTS);
fLayer.selectFeatures(q, SelectionMode.NEW, callback);