Crop and zoom on mobileimageviewer

I have an image (map) that I get from a passed in URL that I display on a mobileimageviewer. i’d like to be able to zoom into a defined location on the image when clicking on the image. Do I need to convert to a picture first? Does anyone have an example. It’s a US native plant map and I want to zoom into MA when clicking the image, or even better where clicked would be neat

Thanks
Sharon

You can use a canvas with pinch, scroll, and zoom gestures. I’ve had good luck with this code:

1 Like

I’d considered something like this but i’m not using a canvas because I need the URL properly of the mobileimageviewer to get the image I want

MobileImageViewer.URL is a handy feature to download an image with just one line of code.

If you want to display it in a Canvas, you will first need to download the image using URLConnection.

1 Like

ok I’ll give that a try and then see if I can can zoom in like mentioned above

ok so that does zoom but doesn’t really keep it centered. I’d rather just click on the picture and make that point the center and zoom a fixed amount, or maybe I could just draw the portion of the image I want. I’ll fiddle around with it but a good start. Thanks!