Image CLIPPING | API 4.25 (Next)

520
4
11-30-2022 01:10 AM
MichaelK1
New Contributor III

Hi

I'm using the new SVG to CIMSymbol functionality (https://codepen.io/michaelk95/pen/zYzrYXK?editors=1000 It works perfectly!)

When using ScaleX primitive override:

primitiveOverrides: [{
type: 'CIMPrimitiveOverride',
primitiveName: 'pictureOver',
propetryName: 'ScaleX',
valueExpressionInfo: {
type: 'CIMExpressionInfo',
title: 'Custom',
expression: `$feature.WIDTH`,
returnType: 'Numeric'
}
}],

The image clipping occurs sometimes when zooming in and out.

Codepen:

https://codepen.io/michaelk95/pen/zYzrYXK?editors=1000

Screenshots:

MichaelK1_0-1669799320303.pngMichaelK1_1-1669799358440.png

 

Tags (2)
0 Kudos
4 Replies
AnneFitz
Esri Regular Contributor

Hi, glad to hear the conversion from SVG is working well for you!! The cut off issue you are running into is a known limit right now unfortunately. It happens when you use a size visual variable based on real world sizes (lines 273-275 in your codepen). At larger scales, the symbol becomes too large to render properly with our current implementation. This is why you only notice cut off when zooming in to large scales, but don't notice it when zooming out.

A workaround for this could be to set a maxScale on your MapView so that users cannot zoom in to scales where the symbols get cut off.

Side note: ScaleX is only a property on CIMPictureMarker symbol layers, so that primitive override has no effect now that you are using a CIMVectorMarker symbol layer.

michaelkdev
New Contributor III

Is it fixed in v4.28?

0 Kudos
AnneFitz
Esri Regular Contributor

No, but you should see some improvement in the next release (4.29), which is planned for February. You can test this out on the development version of the API at https://js.arcgis.com/next. I'm still noticing a cut off when very zoomed in and the symbol takes up the entire screen, but it should be an improvement from previous versions. 

0 Kudos
michaelkdev
New Contributor III

Update with 4.27:

I'm still having issues with the CIM symbol image clipping when using the size override. 

I made a codepen with the ArcGIS js api version 4.27 : https://codepen.io/michaelk95/pen/wvpgzaR?editors=1010

When zoomed out:

michaelkdev_0-1687432278873.png

 

 

When zoomed in:

michaelkdev_1-1687432278905.png

Any updates on this topic?

0 Kudos