Select to view content in your preferred language

Does renderPreviewHTML only work for certain symbols?

446
0
04-29-2020 05:49 AM
ae
by
Frequent Contributor

Hi, 

I'm using symbolUtils renderPreviewHTML to generate preview images of symbols. I've noticed that this function only seems to work with certain symbols types. For instance, I cannot get it to work with any 3D symbols, or with web-style symbols. I usually get an error in the console, for instance: 

previewSymbol3D.js:formatted:525 Uncaught (in promise) TypeError: b.getItemAt is not a function
at Object.B.previewSymbol3D

I cannot find any documentation regarding this in the API. Does anyone know?

An example of a symbol that does not work with renderPreviewHTML: 

{
        type: "polygon-3d",
        symbolLayers: [
          {
            type: "extrude",
            size: 10// extrude by 10 meters
            material: {
              color: [9292921]
            },
            edges: {
              type: "solid",
              size: "3px",
              color: [9292921]
            }
          }
        ]
      }
0 Kudos
0 Replies