Select to view content in your preferred language

ExtrudeSymbol3dLayer size can not be negative

1330
6
04-03-2022 09:20 AM
ChristopheSuter
Regular Contributor

Hi,

The reference documentation says tha ExtrudeSymbol3DLayer can be negative, see: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html....

But it seems this is not the case, using https://developers.arcgis.com/javascript/latest/sample-code/playground/live/#/config=symbols/3d/Poly... (the symbol playground), entering negative values for size logs a warning "(index):106 [esri.views.3d.layers.graphics.Graphics3DSymbolLayer] Symbol sizes may not be negative values".

Am I wrong somewhere, is there anyone having the same problem ?

0 Kudos
6 Replies
KristianEkenes
Esri Regular Contributor

The documentation is incorrect and needs to be updated. You need to set the anchor property to "top" to extrude symbols below the surface. I'm now realizing that anchor doesn't exist on ExtrudeSymbol3DLayer, but it does on ObjectSymbol3DLayer. I'm not sure why there's this difference. Will check...

Here's the documentation for ObjectSymbol3DLayer.anchor.

JohnGrayson
Esri Regular Contributor

Negative extrusion values work ok if using a FeatureLayer ( https://codepen.io/john-grayson/pen/QWaQpXd )  I don't think negative extrusion values are allowed for GraphicsLayer, so you can use a FeatureLayer with client-side Graphics instead.  In the example above we use this technique to load the residential features, shown in green with a different offset.

ChristopheSuter
Regular Contributor

Thanks John, I saw that, but I needed it on a graphicsLayer, hope this will be avaiable in a future release ...

0 Kudos
JohnGrayson
Esri Regular Contributor

Why GraphicsLayer instead of FeatureLayer (with client-side Graphics)?  You get more functionality when using a FeatureLayer... is there a reason why you can't use a FeatureLayer as shown in the last part of the CodePen I shared above?

0 Kudos
ChristopheSuter
Regular Contributor

FeatureLayers can not be used for sketching as MapNotesLayers can (those use GraphicsLayers). I need to be able to save sketches with my webmap, this is ok with MapNotes layers but not with FeatureLayers with client-side source graphics... as far I know..

0 Kudos
JohnGrayson
Esri Regular Contributor

Thank you for the explanation.

0 Kudos