JSAPI externalrenderer causes graphics in graphics layer to not draw in SceneView

187
1
08-22-2019 10:21 AM
MattEnglish
Esri Contributor

In a SceneView, if I add graphics to a graphics layer AFTER I add an external renderer to the view,  the graphics do not draw. If I add them BEFORE adding the external renderer to the view, they do draw, To reproduce, go to this sandbox:

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=scene-external...

Copy and paste this codeblock before line 87 - this works, you'll see a graphic over London, England. If you then put this code block after adding the external renderer, you will not see the graphic. This behaviour, we've noticed since 4.6.

Our desire is to add graphics after an external renderer has been added

require(["esri/layers/GraphicsLayer","esri/Graphic"], function(GraphicsLayer, Graphic) {

var graphicsLayer = new GraphicsLayer();
map.add(graphicsLayer);

// London
var point = {
type: "point", // autocasts as new Point()
x: -0.178,
y: 51.48791,
z: 1010
};

markerSymbol = {
type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
color: [226, 119, 40],
outline: {
// autocasts as new SimpleLineSymbol()
color: [255, 255, 255],
width: 2
}
};

var pointGraphic = new Graphic({
geometry: point,
symbol: markerSymbol
});

graphicsLayer.add(pointGraphic);

});

0 Kudos
1 Reply
JavierGutierrez
Esri Contributor

Hi Matt English,

I cannot repro the problem, following your suggested steps I add the code snippet to the sample in line 453 and the point graphic shows correctly over London. Could you provide another repro case?

Thanks!

Regards,

Javier

0 Kudos