identifyGraphicsOverlaysCompleted does not work on the inner part of filled polygons

585
2
Jump to solution
08-16-2022 01:40 AM
Labels (2)
FatmaAkdemir
Occasional Contributor II

I have a polygon object which I want to be deleted by the double click of mouse. However the double click only works if I click on the outer line of the polygon. I want it to work when user double clicks on inside of the polygon which is filled with a different color. How can I achieve this?

void ClutterZoneItem::AddFillerPolygon(){
	for(int i = 0; i < mNodes.size(); i++){
		mpPolygonBuilder->addPoint(mNodes[i]->geometry());
	}
	mpFillerPolygon->setGeometry(mpPolygonBuilder->toGeometry());
	mpFillerPolygon->attributes()->insertAttribute("zone_id", miId);
	mpMapViewer->AddToClutterZonesOverlay(mpFillerPolygon);
	cout << "Filler polygon eklendi" << endl;
}
0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi @FatmaAkdemir . We have a sample that does this here. It should be working. Can you share more details about this? For example, are you identifying a single graphic whose geometry is a polygon, or do you have multiple graphics and each has a separate polygon?

The fact that you are able to delete polyons independently seems like you may have multiple graphics.

View solution in original post

0 Kudos
2 Replies
JamesBallard1
Esri Regular Contributor

Hi @FatmaAkdemir . We have a sample that does this here. It should be working. Can you share more details about this? For example, are you identifying a single graphic whose geometry is a polygon, or do you have multiple graphics and each has a separate polygon?

The fact that you are able to delete polyons independently seems like you may have multiple graphics.

0 Kudos
FatmaAkdemir
Occasional Contributor II

Hi @JamesBallard1 ,

Thanks for your answer. You're correct, I have a list of point nodes which are movable via mouse move and I have a polygon that is reshaped by the movement of these nodes. Somehow the inner part can only be double clicked if one of the nodes is moved, otherwise it's not. It seems to be a bug that I should solve by myself in my own code.