Do not scale some images in a group

Hi,

I would need some suggestions to solve the following:

I have an image that can be panned and zoomed. In this image I allow the user to add pins. Currently those pins are in the same group of the image, so they move along when the image is panned.

When I zoom the image, the pins are also scale which is normal since they are in the same group.

How would you suggest to still keep the pins to be attached at the proper location (x/y) in the map, but that the pins always keep their original scale.

thanks for your suggestions,
[import]uid: 28795 topic_id: 26962 reply_id: 326962[/import]

Do you have any code to show us? Show us the part where the scaling occur!

Joakim [import]uid: 81188 topic_id: 26962 reply_id: 109449[/import]

I can’t promise it would work, but you can try to inverse scale each pin during your zoom routine. So, imagine that you scaled the map by a factor of 1.5, or 150% (I know it wouldn’t be such an abrupt a jump, but the theory holds). Each of your pins should be stored in a table so you can loop through it and downscale them. That downscale would simply be 1 / 1.5 (so, 0.6666666667). Scale each pin by this factor and it should appear that the pins are the same size even while the map expands.

Contracting will also work; if the map scales down to 40% its original size, 1 / 0.4 = 2.5, the scale to apply to the pins.

Brent [import]uid: 9747 topic_id: 26962 reply_id: 123729[/import]

I can’t promise it would work, but you can try to inverse scale each pin during your zoom routine. So, imagine that you scaled the map by a factor of 1.5, or 150% (I know it wouldn’t be such an abrupt a jump, but the theory holds). Each of your pins should be stored in a table so you can loop through it and downscale them. That downscale would simply be 1 / 1.5 (so, 0.6666666667). Scale each pin by this factor and it should appear that the pins are the same size even while the map expands.

Contracting will also work; if the map scales down to 40% its original size, 1 / 0.4 = 2.5, the scale to apply to the pins.

Brent [import]uid: 9747 topic_id: 26962 reply_id: 123729[/import]