Page 1 of 1

Zoomable Image

Posted: Thu Feb 27, 2014 4:42 pm
by Mike6580064

I have a large-sized image of a floor plan that needs be able to be zoomed in and out of so the user can navigate around the map and be able to read the small print.

I originally created a page that called on a PDF of the map stored in my database. The problem with that was that the PDF only filled the screen and could not be rescaled.

I also had the PDF open in the device's browser using window.open("URL", "_system"); but would really prefer to view the map within the app.

I've created a large-scaled JPEG of the map to use as well. Is there a way I can get this image to display actual-size so the user can scroll left/right and zoom in/out of it?


Zoomable Image

Posted: Thu Feb 27, 2014 5:45 pm
by Illya Stepanov

Hi Mike -

Perhaps you can try this: https://github.com/EightMedia/hammer.js/


Zoomable Image

Posted: Thu Feb 27, 2014 7:30 pm
by Mike6580064

window.open('URL', '_blank', 'EnableViewPortScale=yes');

This allows pinch and zoom of PDFs within the app.


Zoomable Image

Posted: Thu Feb 27, 2014 7:43 pm
by Illya Stepanov

So it works for you?


Zoomable Image

Posted: Fri Feb 28, 2014 3:03 pm
by Mike6580064

Yes for iOS at least. Haven't tried it on Android.