Adding Multiple Graphics to view.graphics Causes Incorrect Rendering

122
1
a month ago
AlexCopli
New Contributor

When I use view.graphics.add to add multiple point, line, and polygon graphics to the map, the polygons/polylines cause each other's displayed shapes/paths to get clipped off when rendering.

Zooming in and causes a successful re-rendering but that's not a great solution for every time a user accesses or changes a feature.

How can I make all of the graphics render correctly without adjusting the zoom?

I've attached screen shots of:
A polygon drawn with SketchViewModel before saving which is a black outline.

The same polygon rendered as a graphic added to view.graphics which is filled in with orange.

A polyline drawn with SketchViewModel after creating the polygon before saving which is a black polyline.

The rendering of both the polygon and polyline in orange where most of the polyline is not visible.

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

Thanks for posting your question here @AlexCopli. Can you share a simplified reproducible test app that demonstrates this behavior? I'd like to see how you are doing this.

We have what I think is a similar sample to what you are trying to accomplish, and it seems to work: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=intro-graphics

0 Kudos