This project is read-only.

return only features of a shapefile layer that's in the extent

May 1, 2014 at 11:21 PM
how do I return only the features from a shapefile layer that's viewable in the current extent?
What I'm trying to do is create a plugin that contains a timer set to 1 minute. Every minute an attribute of those points in the extent will get updated which will be displayed as a point label. All other points not viewable will not get updated until they become visible on the map. Also, if the layer is chosen to be invisible in the legend then the layer ceases to update completely until someone makes the layer visible in the legend.
May 2, 2014 at 6:28 PM
Extent boundingBox = App.Map.MapFrame.Extent;
List<IFeature> visibleFeatures = ((FeatureSet)myLayer.DataSet).Select(boundingBox);
I tried the following code and it returns an incorrect number of visibile points. Is there an extent I should use rather then the mapframe?
May 2, 2014 at 9:53 PM
extent to test against is