<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Adding 3D Models, Not Markers, To The Map]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=829&amp;type=atom" />
	<updated>2018-06-08T10:14:56Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=829</id>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3647#p3647" />
			<content type="html"><![CDATA[<p>Thanks!!!<br />It fixed my problem</p><p>Kind Regards</p>]]></content>
			<author>
				<name><![CDATA[adri2111]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=751</uri>
			</author>
			<updated>2018-06-08T10:14:56Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3647#p3647</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3645#p3645" />
			<content type="html"><![CDATA[<p>Example:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class MyAwesomeBuilding: MonoBehaviour
{
    public double longitude;
    public double latitude;

    /// &lt;summary&gt;
    /// Zoom, when the scale = 1.
    /// &lt;/summary&gt;
    public int defaultZoom = 15;

    private void Update()
    {
        transform.position = OnlineMapsTileSetControl.instance.GetWorldPosition(longitude, latitude);

        float originalScale = 1 &lt;&lt; defaultZoom;
        float currentScale = 1 &lt;&lt; OnlineMaps.instance.zoom;
        float scale = currentScale / originalScale;
        transform.localScale = new Vector3(scale, scale, scale);
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-06-08T08:55:42Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3645#p3645</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3643#p3643" />
			<content type="html"><![CDATA[<p>I try to &quot;special building&quot; on a particular position (long and lat). My first step was to make a Marker3D but it had been scale with the zoom feature and I want to keep a the map scale equals to the buildings behaviour. <br />I don&#039;t undestand how can I do with your last post. How can I use the OnlineMapsTileSetControl.GetWorldPosition? Some other idea?</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[adri2111]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=751</uri>
			</author>
			<updated>2018-06-07T16:34:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3643#p3643</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3638#p3638" />
			<content type="html"><![CDATA[<p>Unfortunately, I did not understand your first question.<br />Please rephrase it.</p><p>If your model can be a marker, then use OnlineMapsControlBase3D.AddMarker3D:<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBase3D.html#a0c963c8e87f26f18ddfc54772d217de3">http://infinity-code.com/doxygen/online … 772d217de3</a><br />If your model for some reason can not be a marker, then you need to position it manually by converting coordinates to Unity World Position using OnlineMapsTileSetControl.GetWorldPosition:<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsTileSetControl.html#adcfdea4962fd10c64683602992c6e097">http://infinity-code.com/doxygen/online … 2992c6e097</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-06-01T15:45:16Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3638#p3638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3637#p3637" />
			<content type="html"><![CDATA[<p>Alex Vertax, in your example I see no way to add the marker at the required geopositional coordinated. Do I need to do the follow to add 2D marker on the point with longitude lon and latitude lat?<br />map.AddMarker(new Vector2 (lat, lon));</p><p>One more question. What do I need to do for adding my 3D-model at (lon, lat) to the map?</p>]]></content>
			<author>
				<name><![CDATA[YanaAzur]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=597</uri>
			</author>
			<updated>2018-06-01T15:35:04Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3637#p3637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3572#p3572" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Example with markers:<br /><a href="http://infinity-code.com/atlas/online-maps/pages/MarkerScaleByZoomExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p><p>I saw that you do not want to use markers.<br />But in this example, you can see the way to implement what you want to do.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-04-24T18:57:09Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3572#p3572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding 3D Models, Not Markers, To The Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3569#p3569" />
			<content type="html"><![CDATA[<p>I am sure this is discussed somewhere, I just haven&#039;t been able to locate it.<br />I was wondering if there was an example of adding a 3D object to the map at a set lat/long and altitude/height off map, but not have it scale with zoom. I see the example for the 3D markers, but I do not want the 3D object to scale as I zoom, but I do want it locked to the proper place (lat/long) on the map as I translate the map. Some example uses for this would be showing a real scale drone/airplane flying in an area, and the second use I want this for is for displaying custom 3D models of buildings. If there is some other approach I am missing for this please let me know.&nbsp; </p><p>Again thank you.</p>]]></content>
			<author>
				<name><![CDATA[jcarff]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=681</uri>
			</author>
			<updated>2018-04-24T16:23:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3569#p3569</id>
		</entry>
</feed>
