Android Question B4XMap and ScaleGestureDetector (Zoom In and Out with Fingers) [B4A]

Magma

Expert
Licensed User
Longtime User
Hi there...

Well I am trying to use some ZoomImageView subs found (TouchListener_Event, ScaleListener_Event) at B4XMap...

but have some problems... more specific when zooming with touch/finger/gesture... sometimes work.. but many times not... this has to do with map (and not drawn tiles, yet - if i put try catch sometimes working) - but i think is better to check if tiles drawn but how ?

I am attaching the code here - if someone can help..

Thanks in advance
 

Attachments

  • syours.zip
    87.3 KB · Views: 63

Magma

Expert
Licensed User
Longtime User
Do you get any error? Are you trying to show a large image? Are you testing it in release mode?

If the image is large then it is better to use HugeImageView.
Hi Erel... not using ZoomImageView - but got some subs from it to use them in B4XMap... want to use fingers to zoom in-out at b4xmap (not having this feature)... so combine some of your library at the b4xmap library... but getting error that cvmap is not initialized... sometimes... can't figure why...
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
I want to add zoom gestures to this B4XMap library.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I want to add zoom gestures to this B4XMap library.
actually this is i am doing in that project... but had some errors - you are welcome to fix...

- i ve uncompressed b4xlib of b4xmap into my project (so no need to added as library) and trying to add gestures (added but sometimes getting error)
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Well, I checked it.

You should be aware that zoom levels make tile (image) requests to the tile servers.

You can activate caching, to save images according to the zoom level, which makes the file where they are saved grow a lot.

 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Well, I checked it.

You should be aware that zoom levels make tile (image) requests to the tile servers.

You can activate caching, to save images according to the zoom level, which makes the file where they are saved grow a lot.

Well will be nice - if you can do that shared it here... activate caching and no getting error then...

but I think the problem is not only there... if the problem was that... that will only "slow" the display/show - but not only slow - getting error too.. so need to somehow said to subs-routines wait for draw the tiles.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
....Well.....

if i remove the whole SELECT CASE...END (at Private Sub fViewTouch_Touch (Action As Int, X As Float, Y As Float) As Boolean) / actually have it for moving...

zoom in - out works... without ERROR !

but not moving (ofcourse)...

But this is a "point" that may be help to check why gives error if have those two the same time...
 
Upvote 0
Top