Select to view content in your preferred language

Can the CIMGeometricEffectBuffer be prevented from disconnecting from its 'parent' layer?

550
2
Jump to solution
11-09-2023 07:14 AM
ViktorSafar
Frequent Contributor

I need a line symbol with an outline so I have used a CIMLineSymbol with 2 layers of CIMSolidStroke, one of them with a CIMGeometricEffectBuffer.

Can the buffered element be made to stick to the 'parent' layer and not disconnect as it is shown on this GIF?

CIMGeometricEffectBuffer.gif

 

 

const createLineSymbol = (color, outlineColor) => ({
  type: 'cim',
  data: {
    type: 'CIMSymbolReference',
    symbol: {
      type: 'CIMLineSymbol',
      symbolLayers: [
          {
              type: 'CIMSolidStroke',
              enable: 'true',
              effects: [{
                  type: 'CIMGeometricEffectBuffer',                
                  size: 3,
              }],
              capStyle: 'Butt',
              joinStyle: 'Round',
              width: 1,
              color: outlineColor
          },
          {
              type: 'CIMSolidStroke',
              enable: true,
              capStyle: 'Butt',
              joinStyle: 'Bevel',
              width: 6,
              color: color
          }
      ]
    }
  }
});

 

 

0 Kudos
1 Solution

Accepted Solutions
AnneFitz
Esri Regular Contributor

@ViktorSafar - what version of the API are you using? And how are you drawing/moving the symbol in your map? 

I just tried to repro with this same symbol and the Draw class and could not. It works as expected for me - https://codepen.io/annefitz/pen/qBgmNBV?editors=100 (use the button in the top right to start drawing the line) 

polyline-draw.gif

If you could provide more info as to how this is happening, or even a reproducible example, that would be great. Thanks!

View solution in original post

0 Kudos
2 Replies
AnneFitz
Esri Regular Contributor

@ViktorSafar - what version of the API are you using? And how are you drawing/moving the symbol in your map? 

I just tried to repro with this same symbol and the Draw class and could not. It works as expected for me - https://codepen.io/annefitz/pen/qBgmNBV?editors=100 (use the button in the top right to start drawing the line) 

polyline-draw.gif

If you could provide more info as to how this is happening, or even a reproducible example, that would be great. Thanks!

0 Kudos
ViktorSafar
Frequent Contributor

I am using 4.24.7

If I downgrade your solution to 4.24 I get the same issue. It's obviously been fixed so I'll just upgrade. Thanks!

0 Kudos