I like to add text information to each feature in the shown map extent in my MapControl/PageLayoutControl. Adding the text is not a problem, but I couldn't find a way on how to get the features.
Is there a way to get all features in a layer that are in the current map extent?
Answer
Have you looked at:
Dim pEnv As IEnvelope
pEnv = pAv.ScreenDisplay.DisplayTransformation.VisibleBounds
Setting the envelope = to the activeview visible bounds. You will then have to define a spatial filter, find the specific feature class, and set that to a featurecursor to grab all the features.
No comments:
Post a Comment