moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 335 forks source link

image size calculating #504

Closed MoeBro closed 5 years ago

MoeBro commented 5 years ago

Hi. Im tiling an image that is originally 400x1600 pixels, but in order to show it fully in the tileview i have to set the size to 5000x20000, why is that? I need to place markers but i want to know the exact amount the tileview upscales the image in size.

moagrius commented 5 years ago

what version of the library are you using?

MoeBro commented 5 years ago

V3. Im using your demo app but with my own pictures etc

moagrius commented 5 years ago

So you're saying you have to blow up your image before creating tiles? What size and density is the screen you see this happening on?

MoeBro commented 5 years ago

Hmm im using the Nexus 5x emulator but its the same even on a new android phone. Spec sheet says 5.2" 1080x1920 pixels. I dont blow up the image. i tile the image to tiles that are 20 pixels by 20 pixels, but for some reason i have to set the size of the tileview to a way bigger size than the original image

moagrius commented 5 years ago

Should not have to. Can you put your project somewhere I can see it? I can look this weekend

MoeBro commented 5 years ago

I can kind of make due with scaling my coordinates to match the tileview size, since i need the project tomorrow for testing something, but i can put it all somewhere so you can take a look.

Here it is: https://github.com/MoeBro/TileView-masterDemo

moagrius commented 5 years ago

Sorry I haven't gotten to this yet. I'll try again this weekend.