Select to view content in your preferred language

Pan To A Selected Graphic

719
1
05-06-2010 02:05 PM
KevinKingrey
Emerging Contributor
I need to pan the map using VB to a point selected in a graphics layer named "Results".  I have not been successful in finding an example to use.  Does anyone have some examples I could referr to?  I know this should be pretty simple, but I'm not having any luck.

Thanks,
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
If you want to pan to a graphic object of your graphics layer, you can directly call the PanTo method of the map:

graphic.Geometry.SpatialReference = MyMap.SpatialReference
MyMap.PanTo(graphic.Geometry)


/Dominique
0 Kudos