<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — PLease insert this if I am wrong]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=187</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=187&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in PLease insert this if I am wrong.]]></description>
		<lastBuildDate>Mon, 18 Jul 2016 13:34:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: PLease insert this if I am wrong]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=858#p858</link>
			<description><![CDATA[<p>Hello.</p><p>Full example below.<br />This example is made for Online Maps v2.4. The new method is much shorter, faster and easier.<br />So, if you use Online Maps v2.3, please update through the built-in update system.</p><p>Why do you want to use it as an overlay?<br />This overlay completely hide the map, and can be used as base tiles.</p><p>Example:<br /></p><div class="codebox"><pre><code>using System.Collections.Generic;
using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    public class TilesetMapTilerOverlayExample3 : MonoBehaviour
    {
        private List&lt;OverlayItem&gt; loadingOverlays;

        private void CheckDownloadComplete()
        {
            bool hasComplete = false;
            foreach (OverlayItem data in loadingOverlays)
            {
                if (data.www.isDone)
                {
                    if (string.IsNullOrEmpty(data.www.error))
                    {
                        Texture2D texture = new Texture2D(256, 256, TextureFormat.ARGB32, false);
                        data.www.LoadImageIntoTexture(texture);
                        data.tile.overlayBackTexture = texture;
                    }
                    data.Dispose();
                    hasComplete = true;
                }
            }

            if (hasComplete) loadingOverlays.RemoveAll(d =&gt; d.tile == null);
        }

        private void OnStartDownloadTile(OnlineMapsTile tile)
        {
            loadingOverlays.Add(new OverlayItem(tile));
            OnlineMaps.instance.StartDownloadTile(tile);
        }

        private void Start()
        {
            loadingOverlays = new List&lt;OverlayItem&gt;();
            OnlineMaps.instance.OnStartDownloadTile += OnStartDownloadTile;
        }

        private void Update()
        {
            CheckDownloadComplete();
        }

        internal class OverlayItem
        {
            public OnlineMapsWWW www;
            public OnlineMapsTile tile;

            public OverlayItem(OnlineMapsTile tile)
            {
                this.tile = tile;
                www = OnlineMapsUtils.GetWWW(string.Format(&quot;http://tile2.opencyclemap.org/Outdoors/{0}/{1}/{2}.png&quot;, tile.zoom, tile.x, tile.y));
            }

            public void Dispose()
            {
                www.Dispose();
                www = null;
                tile = null;
            }
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 18 Jul 2016 13:34:03 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=858#p858</guid>
		</item>
		<item>
			<title><![CDATA[Re: PLease insert this if I am wrong]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=853#p853</link>
			<description><![CDATA[<p>I can not achive, I am not C# expert why do not you give me one line code sample ? <br /><a href="http://tile2.opencyclemap.org/Outdoors/{zoom}/{x}/{y}.png">http://tile2.opencyclemap.org/Outdoors/ … x}/{y}.png</a><br />could you please insert this line in the code of ...<br />TilesetMapTilerOverlayExample.cs .Thanks...</p>]]></description>
			<author><![CDATA[null@example.com (gokhanaltintas)]]></author>
			<pubDate>Mon, 18 Jul 2016 00:32:25 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=853#p853</guid>
		</item>
		<item>
			<title><![CDATA[Re: PLease insert this if I am wrong]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=846#p846</link>
			<description><![CDATA[<p>Hello.</p><p>Resources.Load - loads an asset stored at path in a Resources folder.<br /><a href="https://docs.unity3d.com/ScriptReference/Resources.Load.html">https://docs.unity3d.com/ScriptReferenc … .Load.html</a></p><p>If you want to load overlay from the url, use OnlineMapsUtils.GetWWW.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsUtils.html#a6385d6bcea326996cffc2d8f230fe2ca">http://infinity-code.com/doxygen/online … 8f230fe2ca</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 16 Jul 2016 15:50:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=846#p846</guid>
		</item>
		<item>
			<title><![CDATA[PLease insert this if I am wrong]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=845#p845</link>
			<description><![CDATA[<p>Resources.Load&lt;Texture2D&gt;(string.Format(&quot;OnlineMapsOverlay/{0}/{1}/{2}&quot;, tile.zoom, tile.x,tile.y));<br />Noting is worked may be I have syntax error.<br />can you insert this into above format I awant to overlay this ... only need format...<br /><a href="http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{zoom}/{y}/{x}">http://services.arcgisonline.com/arcgis … m}/{y}/{x}</a></p><br /><p>....................<br />Resources.Load&lt;Texture2D&gt;(string.Format(&quot;http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{0}/{1}/{2}&quot;, tile.zoom, tile.x,tile.y));<br />???<br />Resources.Load&lt;Texture2D&gt;(string.Format(&quot;http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{0}/{1}/{2}.png&quot;, tile.zoom, tile.x,tile.y));<br />????<br />etcccc</p>]]></description>
			<author><![CDATA[null@example.com (gokhanaltintas)]]></author>
			<pubDate>Fri, 15 Jul 2016 15:53:40 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=845#p845</guid>
		</item>
	</channel>
</rss>
