Want to create a feature layer with a picture renderer but I want to stretch the image based on real size. Adding a height and width for a specific image.
For example this image with the correct width and height (width and height are present in the graphics attributes)
Is it possible to add visual variables like Point3D width and depth, height for 2D pictures ? Maybe with CIMPictureMarker
Or an alternative?
Hey Michael - yes this is possible with CIM symbols! You can use primitiveOverrides to updates specific properties of a symbol layer, like width and height. See this example for more information on how to use primitiveOverrides. For CIMPictureMarker , you would want to override the "size" property, which will update the height of the marker. The width will be updated proportionally. Don't hesitate to reach out if you have any questions! :smiling_face_with_smiling_eyes:
Yes Thanks, but is it possible to NOT update width proportionally. And override height and width property separately for CIMPictureMarker or other 2D picture based markers?
I think this is possible, if I’m correctly understanding what you’re asking. You could use the size property to update the height of the picture marker symbol, and then use the scaleX property to override the width of the symbol layer. I haven’t tried this out personally, but I think it should work. Let me know how it goes!
Thanks - it looks like we might have a bug with primitiveOverrides and the CIMPictureMarker symbol layer. We'll look into it and I'll get back to you as soon as we have a fix.
@MichaelK1 and @PoaBVG , this bug has been fixed for version 4.21, which will be released in a couple weeks. If you want to test out the fix before it is officially released, you can use the `/next` version of the API: https://js.arcgis.com/next/
Let me know if you have any further questions! Thanks.