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;
}
Solved! Go to Solution.
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.
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.
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.