<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Online maps 3.0.0.30 and Marker 3D scaling]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1011&amp;type=atom" />
	<updated>2019-01-30T20:17:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1011</id>
		<entry>
			<title type="html"><![CDATA[Re: Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4532#p4532" />
			<content type="html"><![CDATA[<p>Here is a video of the same script with elevations:<br /><a href="https://www.dropbox.com/s/zn5fnriquadsvb4/2019-01-30.mp4?dl=0">https://www.dropbox.com/s/zn5fnriquadsv … 0.mp4?dl=0</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-01-30T20:17:24Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4532#p4532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4530#p4530" />
			<content type="html"><![CDATA[<p>Thanks Alex.<br />I made some tests and found out that the bug only appears when I use the script OnlineMapsBingMapsElevationManager.cs.<br />If I desable it the scaling works great.</p><p>Is it something you already experienced?</p>]]></content>
			<author>
				<name><![CDATA[Pentos]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=73</uri>
			</author>
			<updated>2019-01-30T12:35:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4530#p4530</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4529#p4529" />
			<content type="html"><![CDATA[<p>Video:<br /><a href="https://www.dropbox.com/s/qkwfz1g5p3if0vr/2019-01-29%20-%200001.mp4?dl=0">https://www.dropbox.com/s/qkwfz1g5p3if0 … 1.mp4?dl=0</a></p><p>Script:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class TestScale3DMarkers : MonoBehaviour
{
    public float defaultZoom = 3;
    public GameObject prefab;
    private OnlineMapsMarker3D marker;

    private void Start ()
    {
        marker = OnlineMapsMarker3DManager.CreateItem(OnlineMaps.instance.position, prefab);

        OnlineMaps.instance.OnChangeZoom += OnChangeZoom;
        OnChangeZoom();
    }

    private void OnChangeZoom()
    {
        marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
    }
}</code></pre></div><p>What size of map (pixels) are you using?</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-01-29T17:58:05Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4529#p4529</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4524#p4524" />
			<content type="html"><![CDATA[<p>Sorry about the delay.</p><p>I tried your code but it does not work. The 3d Marker still &quot;jump&quot; from one zoom to another and are not resize properly.</p><p>What I did is just add the followig to the start :</p><div class="codebox"><pre><code>OnlineMaps.instance.OnChangeZoom += OnChangeZoom;</code></pre></div><p>And setup OnchangeZomm() like this :</p><div class="codebox"><pre><code>private void OnChangeZoom()
{
        foreach (OnlineMapsMarker3D marker in Markers)
        {
            marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
        }
}</code></pre></div><p>I only have a couple of Markers (less than 10 ) that why I use a foreach.</p>]]></content>
			<author>
				<name><![CDATA[Pentos]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=73</uri>
			</author>
			<updated>2019-01-29T10:54:10Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4524#p4524</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4491#p4491" />
			<content type="html"><![CDATA[<p>Hello.</p><div class="codebox"><pre><code>marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-01-17T09:14:53Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4491#p4491</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Online maps 3.0.0.30 and Marker 3D scaling]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4489#p4489" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I switched from 2.5 to 3.0.0.0.30 and since I use the new Online Maps Marker 3D Manager I have a problem with 3D marker scaling.</p><p>When I was using version 2.5 I changed scale with the following function described in the example MarkerScaleByZoomExample:</p><div class="codebox"><pre><code>private void OnChangeZoom()
{
     float originalScale = 1 &lt;&lt; defaultZoom;
     float currentScale = 1 &lt;&lt; OnlineMaps.instance.zoom;

     marker.scale = currentScale / originalScale;
}</code></pre></div><p>The scaling was working well and was smooth.</p><p>Since I use version 3.0.0.0.30 and Online Maps Marker 3D Manager when I zoom the 3D markers are well resized but it&#039;s not smooth we can see a &quot;jump&quot;.</p><p>Is there another way to using 3D marker scaling with the new version?</p><p>Thank you in advance</p>]]></content>
			<author>
				<name><![CDATA[Pentos]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=73</uri>
			</author>
			<updated>2019-01-16T14:26:24Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4489#p4489</id>
		</entry>
</feed>
