Hi
I query Address from Layer to Listview with ObjectID
how can I zoom to ObjectID
Dim pMxDoc As IMxDocument
pMxDoc = My.ArcMap.Application.Document
Dim pMap As IMap
pMap = pMxDoc.FocusMap
Dim pFlayer As IFeatureLayer = getLayerByName(Layername)
'get the feature class
Dim pFeatureClass As IFeatureClass = pFlayer.FeatureClass
Dim pFeature As IFeature = pFeatureClass.GetFeature(ListView1.SelectedItems(0).Text)
Dim pActiveView As IActiveView
pActiveView = pMap
pMap.ClearSelection()
pMap.SelectFeature(pFlayer, pFeature)
When you post any code please format it, edit your question and follow the instructions here it allows us to follow your code and help you.
There are at least two ways to do this: