Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a balloon callout ISymbol and I want to get a polygon object so I can see if the user clicks it.

I am trying to use the function QueryBoundary http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//001w00000372000000

The function has four arguments:

public void QueryBoundary (
    int hDC,
    ITransformation displayTransform,
    IGeometry Geometry,  //what can I put in here?
    IPolygon boundary
);

One of my major hangups with the third argument is simply the fact that I am using this function to try to get the geometry... so what sense does it make to pass in the thing that I want? Also since the function is called like this :

thissymbol.QueryBoundary(screenDisplay.hDC, displayTransformation, thisGeometry, polygon);

Presumably it doesn't need the geometry of "thissymbol" since "thissymbol" is the caller.

share|improve this question
add comment

1 Answer 1

That would depend on the type of symbol. For a point symbol, I would cast displayTransformation.VisibleBounds to IArea, then pass IArea.Centroid as the geometry.

For line symbols you need a polyline. For fill symbols I think either a polygon or an envelope will work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.