<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — map zoom in one level when tap the marker (billboard or 3d)]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=368&amp;type=atom" />
	<updated>2017-01-06T01:34:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=368</id>
		<entry>
			<title type="html"><![CDATA[Re: map zoom in one level when tap the marker (billboard or 3d)]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1632#p1632" />
			<content type="html"><![CDATA[<p>Thank you for your help.<br />In our case, we decided to uncheck zoom in on double click</p>]]></content>
			<author>
				<name><![CDATA[hung_nguyen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=310</uri>
			</author>
			<updated>2017-01-06T01:34:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1632#p1632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: map zoom in one level when tap the marker (billboard or 3d)]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1617#p1617" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>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);
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-01-05T12:49:03Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1617#p1617</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: map zoom in one level when tap the marker (billboard or 3d)]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1616#p1616" />
			<content type="html"><![CDATA[<p>Thank you for your reply.<br />Can you tell me how to quick fix this problem. In our case, we don&#039;t want the map is zoomed in</p>]]></content>
			<author>
				<name><![CDATA[hung_nguyen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=310</uri>
			</author>
			<updated>2017-01-05T12:29:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1616#p1616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: map zoom in one level when tap the marker (billboard or 3d)]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1614#p1614" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Both. We just missed it.<br />I think we rework this behavior.<br />Thank you pointed out to us on this issue.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-01-05T11:56:17Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1614#p1614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[map zoom in one level when tap the marker (billboard or 3d)]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1613#p1613" />
			<content type="html"><![CDATA[<p>Hello</p><p>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.<br />Is it a feature or a bug?</p><p>Thank you for your time.</p>]]></content>
			<author>
				<name><![CDATA[hung_nguyen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=310</uri>
			</author>
			<updated>2017-01-05T11:44:47Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1613#p1613</id>
		</entry>
</feed>
