Topic: map zoom in one level when tap the marker (billboard or 3d)
Hello
I found that map will zoom in one level when tap the marker (billboard or 3d) if the zoom in on double click is checked.
Is it a feature or a bug?
Thank you for your time.
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → map zoom in one level when tap the marker (billboard or 3d)
Hello
I found that map will zoom in one level when tap the marker (billboard or 3d) if the zoom in on double click is checked.
Is it a feature or a bug?
Thank you for your time.
Hello.
Both. We just missed it.
I think we rework this behavior.
Thank you pointed out to us on this issue.
Thank you for your reply.
Can you tell me how to quick fix this problem. In our case, we don't want the map is zoomed in
using UnityEngine;
public class ZoomInOnDoubleClick:MonoBehaviour
{
private OnlineMapsControlBase3D control;
private void Start()
{
control = OnlineMapsControlBase3D.instance;
// Disable zoomInOnDoubleClick
control.zoomInOnDoubleClick = false;
// Subscribe to double click event
control.OnMapDoubleClick += OnMapDoubleClick;
}
private void OnMapDoubleClick()
{
// Get input position
Vector2 screenPosition = control.GetInputPosition();
// Get 2D marker
OnlineMapsMarker marker2d = OnlineMaps.instance.GetMarkerFromScreen(screenPosition);
if (marker2d != null) return;
// Get billboard and 3D marker
// I know that this is not logical, but it works.
OnlineMapsMarkerInstanceBase marker = control.GetBillboardMarkerFromScreen(screenPosition);
// If marker == null then zoom in.
if (marker == null) control.ZoomOnPoint(1, screenPosition);
}
}Thank you for your help.
In our case, we decided to uncheck zoom in on double click
Infinity Code Forum → Online Maps Help → map zoom in one level when tap the marker (billboard or 3d)
Powered by PunBB, supported by Informer Technologies, Inc.