I need to get the top level feature by clicking on the map.
I have many layers grouping by Overlay:
CustomOverlay: sqlfeaturelayer1, sqlfeaturelayer2, sqlfeaturelayer3…
MarkerOverlay
every layer are displayed at its custom zoom level.
For example :
Country, State, buildings are displayed, if i click one feature i need to get that feature, building, city, or country.
There is an approach to solve this?
Regards.
Get top level feature on click
Hi Ezequiel,
Thanks for evaluating Map Suite products and welcome to our discussion forum.
When adding the layers into the LayerOverlay, we should know the sequence of the layers in the overlay, in other words, which layer will be shown on the top and which will be at the bottom. The one added lasted will be shown on the top level. in this case, we should know which layer will be on the top for search when clicking on the map. Here as following is the code for querying the feature nearest the clicked place from a layer:
worldLayer.FeatureSource.GetFeaturesNearestTo(clickedPoint, GeographyUnit.DecimalDegree, 1, ReturningColumnsType.NoColumns);
Thanks,
Johnny