Select to view content in your preferred language

Search in shapefile file - featureTable

308
1
11-18-2021 08:46 AM
Diego_Mendes_Rodrigues
New Contributor II

I'm using ArcGIS Runtine API for Java.

I add a layer to the map using:

 

private ShapefileFeatureTable featureTable;
...
File shapefile = new File("samples-data", "/Limites.shp");
ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable(shapefile.getAbsolutePath());
featureLayer = new FeatureLayer(shapefileFeatureTable);
featureLayer.setOpacity(0.8f);
featureLayer.setMaxScale(10000);

featureLayer.addDoneLoadingListener(() -> {
if (featureLayer.getLoadStatus() == LoadStatus.LOADED) {
  searchBox.setDisable(false);
} else {
  Alert alert = new Alert(Alert.AlertType.ERROR, "Falha ao carregar o serviço de feições!");
  alert.show();
}
});
...

 

 

How can I run a query in featureLayer, something like LEVEL_4_NA = 'Bahia' ?

0 Kudos
1 Reply
ABishop
MVP Regular Contributor

Select by attribute?  Not sure what this would be in Java language.

Amanda Bishop, GISP
0 Kudos