Select to view content in your preferred language

Add Graphic to the map

628
2
06-30-2013 02:05 PM
RichardMoussopo
Frequent Contributor
Hi,
I have a function that adds a graphic to the map (from ArcGIS Snipet finder). The function takes 3 parameters
as shown below:

 Public Sub AddGraphicToMap(ByVal map As IMap, ByVal geometry As IGeometry, ByVal rgbColor As IRgbColor, ByVal outlineRgbColor As IRgbColor)


The Graphic I want to add is a circle(polygon) where the center is an attribute value from layerQuery and the radius the value entered by the end user.

How can I achieve this?

Thanks
0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
Before you call your AddGraphicToMap procedure you need to convert your XY to a Point then use the ITopolocalOperator.Buffer method to create your circle. This would become your geometry that you pass to the procedure.
0 Kudos
RichardMoussopo
Frequent Contributor
Before you call your AddGraphicToMap procedure you need to convert your XY to a Point then use the ITopolocalOperator.Buffer method to create your circle. This would become your geometry that you pass to the procedure.


Thank you for your reply,

The selected feature (center of the circle) is a point feature class.
0 Kudos