Topic: Disable floatZoom

We have a program, that use a custom UGUImarker.
But on a mobile, while zooming with pinch gesture, the markers lost the correct georeference on the map.
When i reach a whole number, like zoom 17,16, they get to the correct position again.
Anyway to solve that ???

Re: Disable floatZoom

Hello.

I just checked this script on the device, and it works correctly with a float zoom.

You change the size of the map at runtime, right?
If so, make sure that you set the size of the map side equal to N * 256.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Disable floatZoom

No, the map size is constant from the start to the end.
Maybe is my Custom Marker?

My function to update on zoom is :

scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - Config.zoomDefault);
markerGameObject.transform.localScale = new Vector3(scale, scale, scale);

This video shows what is happening.
https://www.dropbox.com/s/j96b4usg754mf … 8.mp4?dl=0

Re: Disable floatZoom

Try this:

scale = Mathf.Pow(2.0f, OnlineMaps.instance.zoom - Config.zoomDefault) / OnlineMaps.instance.zoomCoof;
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Disable floatZoom

Still got the same behaviour.
Maybe there is a way to truncate the zoom only to whole numbers?

Re: Disable floatZoom

Please make a test scene where the problem is appears and send me (as a package) for debugging by email (support@infinity-code.com).
I will definitely find the cause of the problem.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Disable floatZoom

Thanks for the scene.
This is a critical bug in Online Maps, because of which, in Render to Texture mode the map was not positioned correctly when the texture size was not 512x512.

I am very surprised that no one wrote about this problem, because it can be seen visually that the tiles move (jump) when switching to another zoom level (for example, from 16.9 to 17.1).
This can be seen at 5 seconds of your video.

The problem has been fixed.
The new version will be available through the built-in update system in 24 hours.

P.S. Do not use the map in OnEnable, because it is a roulette - singletons of the map will be initialized or not yet.
Use Start method.

P.P.S. Your markers are located a bit higher than they should be.
Comment out the line (Layer_Manager.UpdateMarker):

screenPosition.y += markerRectTransform.rect.height / 2;
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Disable floatZoom

Thanks for the update and your time!
I will give feedbacks as soon as possible.

Re: Disable floatZoom

It's working great.
Thanks for the update!