10-07-2019 01:30 AM
Our goal is to double clic on a feature and run the feature attribute workflow (similar to display feature attributes in GeoMedia).
We know how to catch the double clic event (and get the X and Y coordinates) but then we are stuck with the API.
We tried to use the SpatialAnalysis as bellow:
new SpatialAnalysis(yourSpatialAnalysisListener, SelectionMode.Point, null).selectWithShape();
We faced those problems:
Does anyone know how to get the first feature of the first visible and activable layer under the mouse click, given X and Y coordinates?
11-19-2019 03:29 AM
unfortunately the API does not support the retrieval of features given the X, Y coordinates.
As you already mentioned, you could use the SpatialAnalysis to achieve your goal. In order to see the relationResults inside the spatialAnalyseFinished method, the following needs to be done:
SelectionMode.Point is the right selection mode to use. The selectionShapeCaptured method will be called already after one click, as the SpatialAnalysis can not be configured to react only on double clicks.