mappView camera scaling

Hi, I’m using mappView to show the images taken with a VSC122 camera. I managed to show the images on a Pape widget, but I can’t make the images smaller to fit the layout I can zoom in and out with the scroll wheel, I tried using the transform parameter with a binding to a string variable = ‘[{“select”:“#Paper1”,“scale”:[0.35,0.35]}]’ but that didn’t work. Didn’t understand what the “select” property is, is this the correct way or should I use a different function to scale the image. Thank you

Im not very experiences with this topic. But scale i would use for object inside of svg picture, for that you have to use select command and ID of the object. For image itself I would use width and height attribute. But never tested, so lets wait for suggestions from others.

Hi Jose,

Do you want to show the results from the Vision Function as animation or do you want to show only the image?

In the Paper Widget, if you want to used the parameter Select, you need a SVG File. It is the ID of your SVG Image, here in the documentation, you can find more information about it Paper Widget

For example in my Content I added a Paper Widget with my Limits.svg file. It contains two lines LimHigh and LimLow:
image
In the transform string, I sent the values, where it is going to translate the line, OffsetLimitStr := ‘[{“select”:“#LimHigh”,“duration”:0,“translate”:[0,0 ]}]’ :


If you want to deactive the zoom in / out the value should be 100 in max / minZoomLevel.
Probably you have to scale the translate values to fit with your image :wink:

But if you want to show only the image from the camera, I would recommend you to use the Image Widget, where the Imagepath, it is the actual image from the camera. You can find more info here
The sizeMode parameter as Contain, it going to fit the image in your layout.

I hope, it would help you.

3 Likes