0

I'm loading floor plans into an Android application. I need the user to be able to identify problem areas on the floor plan with a single click. My thought process is to identify the click action, reload the html of the webview adding my marker asset to it at the specified location.

I've loaded the image into a webview to take advantage of zoom capabilities. I can get the X,Y coordinates of the webview where the click occurred, but I can't figure out how to get the current zoom level. Also, I'm not sure what math will be required to translate the X,Y,scale to actual pixel coordinates.

Is the webview the right view for me to use?

EDIT: Using the link suggested below, I got the zoom functionality working. I still can't figure out how to place a drawable marker on top of the TouchImageView, much less get the coordinates that were actually touched on the image.

Bryan F.
  • 23
  • 7

1 Answers1

0

For your zoom question as well as coor, How can I get zoom functionality for images? should help you

The accepted answer does use a WebView, but the other answer uses a better approach for enabling zoom. It also provides the necessary math required for translating your X and Y coordinates into usable points.

Community
  • 1
  • 1
Suchi
  • 9,989
  • 23
  • 68
  • 112
  • Can't seem to get the zoom to work. I finally did get it showing my floorplans, but it's zoomed down to fit the image. – Bryan F. Jul 27 '11 at 00:41