Image move, zoom, pinch & overlay question

Hi, 

I’m working on an festival guide type app. I have to display a map of the festival grounds. The current image I have is 1862 × 2048. I am able to show the image and zoom/pinch using the sample code PinchZoomGesture. I have not yet figured how to make it move. I’m guessing I have to put it into a ScrollView. I will probably find a sample to help me with this too. Can’t believe how useful those samples are. 

Having said that I wondered if there is something in the code exchange since what I’m trying to achieve isn’t that novel and ground breaking. Looked and looked but could not find anything like this. Am I missing something obvious?

Thank you very much for all your help. All the best!

Regards,

Kerem

At the risk of sounding as though I might be talking to myself… I was able to move the image horizontally and vertically using the ScrollView. Not perfect as most people would also move diagonally. Still looking to see if a sample / demo exists doing what I need. If you know one and can point me in the right direction I will be very very grateful. Thank you very much! 

At the risk of sounding as though I might be talking to myself… I was able to move the image horizontally and vertically using the ScrollView. Not perfect as most people would also move diagonally. Still looking to see if a sample / demo exists doing what I need. If you know one and can point me in the right direction I will be very very grateful. Thank you very much! 

Ok. I procastrinated on this scope element while taking care of other areas of my app but now it is time to tackle this one. Trying one last time to see this might catch somebody’s attention. If you know of a sample that puts an image on screen, allows it to be pinch zoomed and moved around (ie dragged) I would love to get a pointer. Been looking high and low but could not find something like this. Thank you very much for your help!

Ok. I procastrinated on this scope element while taking care of other areas of my app but now it is time to tackle this one. Trying one last time to see this might catch somebody’s attention. If you know of a sample that puts an image on screen, allows it to be pinch zoomed and moved around (ie dragged) I would love to get a pointer. Been looking high and low but could not find something like this. Thank you very much for your help!

I’m in the same boat, did you find anything?  

I’m looking into opening up a storyboard overlay with an image so the user can zoom in and have a look around, then close it to get back to the page of text they were reading.

I found a sample in Code Exchange which allowed pinch/zoom/rotate. It was posted by horacebury. I think there are some more recent examples as well. Have you searched the code exchange?

I know ScrollView only allows vertical and horizontal movement and I think I read somewhere here that diagonal is not something they’re planning.

However, just grabbing an image and moving it around the screen isn’t hard, so I’m thinking you should be able to ditch ScrollView and just do it manually. The only possible “hiccup” might be in making that happen along with the pinch/zoom stuff. But that’s what I’d try.

 Jay

Look here : https://developer.coronalabs.com/code/multi-point-pinch-zoom-rotate

and here : http://developer.coronalabs.com/code/pinchzoom-made-real-easy

And remember to thank @Horacebury for his wonderful code.

Thanks for the links!  I was just reading https://gist.github.com/mikofh/7360955 too

I’m in the same boat, did you find anything?  

I’m looking into opening up a storyboard overlay with an image so the user can zoom in and have a look around, then close it to get back to the page of text they were reading.

I found a sample in Code Exchange which allowed pinch/zoom/rotate. It was posted by horacebury. I think there are some more recent examples as well. Have you searched the code exchange?

I know ScrollView only allows vertical and horizontal movement and I think I read somewhere here that diagonal is not something they’re planning.

However, just grabbing an image and moving it around the screen isn’t hard, so I’m thinking you should be able to ditch ScrollView and just do it manually. The only possible “hiccup” might be in making that happen along with the pinch/zoom stuff. But that’s what I’d try.

 Jay

Look here : https://developer.coronalabs.com/code/multi-point-pinch-zoom-rotate

and here : http://developer.coronalabs.com/code/pinchzoom-made-real-easy

And remember to thank @Horacebury for his wonderful code.

Thanks for the links!  I was just reading https://gist.github.com/mikofh/7360955 too

ksan: those have been removed, or the Code Exchange has b0rked its SEF link handling.

mfor1967: that code is a straight copy/paste from the Sample Code library that comes with Corona.

Still looking for a real-world example using scenes with display groups. Basically the only problem is the ‘write it in mainline’ style of all examples. I like to create the objects after the scene is created and then add listeners. Could some kind soul show how to avoid writing function object:touch(e) and remove self references in the example?

Edit: never mind, in tests it seemed a table listener was required. Some common features to add to the very limited example but I think I’ll have no problem.

Yup. Seems like the old Code Exchange links are not working anymore which is a shame. There was so much in there that can still be reworked and used… 

ksan: those have been removed, or the Code Exchange has b0rked its SEF link handling.

mfor1967: that code is a straight copy/paste from the Sample Code library that comes with Corona.

Still looking for a real-world example using scenes with display groups. Basically the only problem is the ‘write it in mainline’ style of all examples. I like to create the objects after the scene is created and then add listeners. Could some kind soul show how to avoid writing function object:touch(e) and remove self references in the example?

Edit: never mind, in tests it seemed a table listener was required. Some common features to add to the very limited example but I think I’ll have no problem.

Yup. Seems like the old Code Exchange links are not working anymore which is a shame. There was so much in there that can still be reworked and used…