Hi,
Thanks for the idea, but it's still not working because the Point passed to identifyLayersAsync is recognized as an android.graphics.point. That's weird.
What I've done so far:
mMapView.setOnTouchListener(new DefaultMapViewOnTouchListener(MainActivity.this, mMapView) {
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
mInfoButton.setVisibility(View.GONE);
mContactButton.setVisibility(View.GONE);
mPlanButton.setVisibility(View.GONE);
Point gps = new Point(-1.640235, 48.127568, SpatialReferences.getWgs84());
final ListenableFuture<List<IdentifyLayerResult>> identifyFuture = mMapView.identifyLayersAsync(gps, 20, false, 25);
// add a listener to the future
identifyFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
// get the identify results from the future - returns when the operation is complete
List<IdentifyLayerResult> identifyLayersResults = identifyFuture.get();
// iterate all the layers in the identify result
for (IdentifyLayerResult identifyLayerResult : identifyLayersResults) {
// iterate each result in each identified layer, and check for Feature results
for (GeoElement identifiedElement : identifyLayerResult.getElements()) {
if (identifiedElement instanceof Feature) {
}
}
}
} catch (InterruptedException | ExecutionException ex) {
Log.e(getResources().getString(R.string.app_name), ex.getMessage());
}
}
});