Select to view content in your preferred language

Issue with polygon.

875
4
01-14-2020 11:40 AM
JeanLonneux
Emerging Contributor

After i add polygon, my map wont refresh anymore. Anyone know how to fix it?

0 Kudos
4 Replies
JamesBallard1
Esri Regular Contributor

Jean Lonneux,

   Can you provide some more context about what you're trying to do? A code snippet would help us identify if anything is wrong.

We do have samples for this:

Qt C++ API:

arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Geometry/CreateGeometries at master · Esri/a... 

Qt QML API:

arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Geometry/CreateGeometries at master · Esri/a... 

Let us know if this helps.

JeanLonneux
Emerging Contributor

Hi James thanks for your reply.

So the thing is i am trying to create a circle (polygon) around a symbol(this located in another overlay) that has few graphics that move around my map(this part works fine until i insert the polygon).

This is how i insert the polygon in the map:

    SimpleFillSymbol* circleSym = new SimpleFillSymbol(SimpleFillSymbolStyle::Solid,  QColor(46,228,255,100), nullptr, m_dictionarySymbol->m_graphicsOverlayCircles);

    m_dictionarySymbol->m_graphicsOverlayCircles->setRenderer(new SimpleRenderer(circleSym));

    Polygon poly1 = GeometryEngine::bufferGeodetic(_point, radius, LinearUnit::meters(), 1, GeodeticCurveType::ShapePreserving);

    PolygonBuilder polygonBuilder(poly1);

    Graphic* graphic1 = new Graphic(polygonBuilder.toGeometry());

    m_dictionarySymbol->m_graphicsOverlayCircles->graphics()->append(graphic1);

0 Kudos
JeanLonneux
Emerging Contributor

I've found why this is happening, i dont know if its a bug or if i misused the effect.

When i use "SimpleFillSymbolStyle::Solid" for some reason the Solid disturb the map, it only update with mouse actions.

I've changed Solid for Cross, Vertical or any other option and it worked fine. Whats bugs me its that i dont know why.

0 Kudos
JamesBallard1
Esri Regular Contributor

Jean Lonneux‌,

    That sounds like a bug. If you're able, please submit that through Esri support so we can investigate the problem.