The iterating points of the tool. Point is taken by the function, which then retrieves the features at that point. What might be the cause of the persistent variations in the results?
SelectionSet selectionSet = MapView.Active.GetFeatures(mapPoint, true, false);
Dictionary<MapMember, List<long>> result = selectionSet.ToDictionary();
foreach (var entry in result)
{
MapMember layer = entry.Key;
List<long> ObjectIDs = entry.Value;
foreach (long OID in ObjectIDs)
{
dat.Add(string.Format("{0}{1}: {2}{3}", "{\"", layer.Name + "\"", OID, "}"));
}
}
Hi,
You use visual intersecting in GetFeatures method. Maybe some features aren't visible at some scales? Try false instead true.
Next thing is geometry in GetFeatures method. Check your mapPoint spatial reference. If needed, project mapPoint to map spatial reference.
Hello @GKmieliauskas As suggested visualintersect is set to false and ran the tool but the results are same.
Try to set whollyWithin parameter to true.
The results remains same 😞
Try to check mapPoint of each round with debugger watch. Is type of mapPoint exactly MapPoint or maybe it is Multipoint type?
Have you tried your code on not utility network layers?
The process collects all the line endpoints and then iterates. So it sends a single point. My data is in a shapefile.
All samples of GetFeatures use only geometry parameter. Try overload with geometry parameter only.
Have you tried GetFeaturesEx method?
I tried all the options but the results vary.
Appreciate it if anyone could help us.