Topic: Zooming on Mobile

Zooming acts very strange on mobile, when I zoom past the max it zooms in and then jerks back out. Also as i zoom out it seems to get clamped to certain values, as in I zoom out and then the maps jerks back to a certain value. Is there a way to have more granule control of the zoom?

Re: Zooming on Mobile

Hello.

Try using this (attached) instead of tileset control.

Post's attachments

Attachment icon CustomTileSetControl.zip 1.73 kb, 43 downloads since 2017-12-27 

Kind Regards,
Infinity Code Team

3 (edited by Mridul 2018-01-17 21:48:50)

Re: Zooming on Mobile

Hello,

This works but I have 2 small problems, I am using the target as the zoom mode.

1) when I let go of the map after zooming, it shifts to the side and does not stay centered at the position where I let go.

2) when I am zooming in and out, the map tiles keep on updating which looks a bit jerky. It's mainly because of the labels (they reload and break the illusion of a smooth zoom) is there any way I can get the to fade in and out perhaps?

4 (edited by Mridul 2018-01-17 23:34:52)

Re: Zooming on Mobile

I did fix the first problem by making sure that the center of the map stays the same while it's being zoomed and after you let go, now it doesn't jump around.

5 (edited by Mridul 2018-01-18 19:11:02)

Re: Zooming on Mobile

Hello, I am having these weird flickering issues while zooming I am not sure how will I go on about fixing it, tried to lock the map draw but that wasn't of much help. I would love to use this new zoom but this is stopping me from doing that.
Attaching the screen recording of the issue.

Also, can you point me in the direction of how will I add inertia to the zooming in and out?

https://www.dropbox.com/s/utijq0hebrc08 … e.mp4?dl=0

Thanks!

P.S for scaling of the markers I am firing a unity event when the user is zooming, and all the markers are subscribed to it and I am scaling them by (markerscale/map.transform.scale.x)

Re: Zooming on Mobile

Hello.

Please make sure that you are using "Online Maps / Troubleshooting / Render In Thread - OFF".

To make the inertia of the zoom, you need to keep the current zoom speeds, and then stop the zooming, still some time to change the zoom value.
You can use this script as an example of inertia implementation:
http://infinity-code.com/atlas/online-m … ample.html
This example is for the inertia of a position, but it's pretty easy to modify for zoom.

Kind Regards,
Infinity Code Team

7 (edited by Mridul 2018-01-18 23:51:41)

Re: Zooming on Mobile

It is off, and I was able to add inertia, it's just the flickering issue now. flickering issue is because when the zoom changes it tries to recreate the marker maybe (hence the jumping around) ? I can cut an apk and send you that if that will help.

Re: Zooming on Mobile

Try this version of the script.

Post's attachments

Attachment icon CustomTileSetControl.cs 5.63 kb, 45 downloads since 2018-01-19 

Kind Regards,
Infinity Code Team

Re: Zooming on Mobile

Alex Vertax wrote:

Try this version of the script.

Hi, I was just wondering what is the use of the m_nextScaleModifier variable you commented ?

Re: Zooming on Mobile

Hello.

In the original script, the updating of transform.localScale occurred on the next frame, but it created a visual artifact with renderInThread - OFF, so the scaling was moved to the current frame.

Kind Regards,
Infinity Code Team

11 (edited by dmytro.krepkikh 2018-03-12 17:42:21)

Re: Zooming on Mobile

Hi. I have tried use CustomTileSetControl.cs but it does not work correctly. When user make zoom in/out the map is disappeared. In other words when Input.touchCount == 2 map becomes invisible. Also I have the same flickering issue on OnlineMapsTileSetControll.
Thanks.

Re: Zooming on Mobile

Hello.

Try this version of the script.

Post's attachments

Attachment icon CustomTileSetControl.cs 4.81 kb, 49 downloads since 2018-03-13 

Kind Regards,
Infinity Code Team