Select to view content in your preferred language

Change svg path on a symbol dynamically

347
0
01-04-2024 03:18 PM
JimBambrough
New Contributor II

I am try to update an svg path on a symbol dynamically AFTER it is rendered on the Map. I suspect I need to do some kind of refresh or something but I haven't had any luck so far. This is a sample of what I am using for the symbol. I am just trying to change the "path" attribute in the symbol object and have that new svg path show up on the Map:

 

 

        let symbol = {
          type: 'simple-marker',
          color: 'red',
          size: '36px',
          path: 'M150 0 L75 200 L225 200 Z',
        };

        const polylineGraphic = new Graphic({
          geometry: {
            type: 'point',
            longitude: -113.074,
            latitude: 33.4484,
          },
          symbol: symbol,
        });

 

 

 

Tags (3)
0 Kudos
0 Replies