I'm trying to create a mobile-friendly web page that will allow a user to drag an <img>
around in a <div>
. I've got this working using the image.ontouchstart
method. Now I want to make it so the user can pinch-to-zoom when viewing this from an iOS device (I'm currently browsing to my page locally from my iPad). From the research I've done so far, it seems like the way to go is to use the Google Maps Javascript API.
My question is:
It is possible to use the Google Maps Javascript API to leverage it's pinch-to-zoom capabilities on a regular image, and not just a map?
Every example I've seen sets up a google.maps.Map
object and specifies a latitude/longitude. I just need it to work for any given <img>
I place into my <div>
. Does anyone know if this is possible, or know of any examples I could look at? Or maybe there is an easier way to do it on a regular image than using the Google API?