Issue with polygon.

724
4
01-14-2020 11:40 AM
JeanLonneux
New Contributor II

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
New Contributor II

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
New Contributor II

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.