<?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 — Zoom up the map and keep the image existing]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1379</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1379&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Zoom up the map and keep the image existing.]]></description>
		<lastBuildDate>Tue, 12 Nov 2019 09:04:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5746#p5746</link>
			<description><![CDATA[<p>Most likely the problem is that before &quot;yield return&quot; you did not mark that the tile is loading (tile.status = OnlineMapsTileStatus.loading), which gives you a huge memory leak and can cause any unexpected problems.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 12 Nov 2019 09:04:58 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5746#p5746</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5744#p5744</link>
			<description><![CDATA[<div class="quotebox"><cite>XiaWuchu wrote:</cite><blockquote><div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>This script only protects tiles from unloading, but does not load new tiles.</p><p>You have two ways:<br />1. Easy way - simple update to Online Maps v3.6.<br />2. Use OnlineMapsTileManager.StartDownloadTile to load the missing tiles in the example above. But you will need to implement this yourself.</p></blockquote></div><p>OK, Thank you!</p></blockquote></div><br /><p>Hello!<br />Finally, I decide to update. As you said, I found if I used Resources to load with the count parent level 20 the image would not disappear. However, I&#039;d like to use StreamAssets to load tiles.</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WWW www = new WWW(&quot;file://&quot; + Application.streamingAssetsPath + &quot;/&quot; + tile.resourcesPath + &quot;.jpg&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yield return www;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Object tileTexture = <a href="http://www.texture">www.texture</a>;</p><p>In this case, the image would disappear when I continued to zoom up. <br />Is there a way to solve it?<br />THX!</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Mon, 11 Nov 2019 13:52:00 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5744#p5744</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5693#p5693</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>This script only protects tiles from unloading, but does not load new tiles.</p><p>You have two ways:<br />1. Easy way - simple update to Online Maps v3.6.<br />2. Use OnlineMapsTileManager.StartDownloadTile to load the missing tiles in the example above. But you will need to implement this yourself.</p></blockquote></div><p>OK, Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Mon, 14 Oct 2019 02:10:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5693#p5693</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5691#p5691</link>
			<description><![CDATA[<p>This script only protects tiles from unloading, but does not load new tiles.</p><p>You have two ways:<br />1. Easy way - simple update to Online Maps v3.6.<br />2. Use OnlineMapsTileManager.StartDownloadTile to load the missing tiles in the example above. But you will need to implement this yourself.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 13 Oct 2019 12:35:02 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5691#p5691</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5690#p5690</link>
			<description><![CDATA[<p>Thank you! It did work! <br />But it worked only for those tiles in the Game window at that moment. When I dragged the map, other tiles were still blank. <br />Is there a way to make whole tiles&#039; image always exist even if there is no corresponding image when I drag or zoom the map?</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Sun, 13 Oct 2019 08:36:20 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5690#p5690</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5689#p5689</link>
			<description><![CDATA[<p>Something like:<br /></p><div class="codebox"><pre><code>using System.Collections.Generic;
using UnityEngine;

public class BlockTiles : MonoBehaviour
{
    public List&lt;OnlineMapsTile&gt; tiles;
    private OnlineMaps map;
    private object blocker;

    private void Start()
    {
        tiles = new List&lt;OnlineMapsTile&gt;();
        map = OnlineMaps.instance;
        map.OnUpdateLate += OnUpdateLate;
        blocker = new object();
    }

    private void OnUpdateLate()
    {
        double tlx, tly, brx, bry;
        map.GetTileCorners(out tlx, out tly, out brx, out bry);
        int max = 1 &lt;&lt; map.zoom;
        if (tlx &gt; brx) brx += max;

        int itlx = (int) tlx;
        int itly = (int) tly;
        int ibrx = (int) brx;
        int ibry = (int) bry;

        foreach (OnlineMapsTile tile in tiles) tile.Unblock(blocker);

        tiles.Clear();

        for (int z = map.zoom; z &gt;= OnlineMaps.MINZOOM; z--)
        {
            for (int x = itlx; x &lt;= ibrx; x++)
            {
                int cx = x;
                if (x &gt; max) x -= max;

                for (int y = itly; y &lt;= ibry; y++)
                {
                    OnlineMapsTile tile = OnlineMapsTile.GetTile(z, cx, y);
                    if (tile != null)
                    {
                        tile.Block(blocker);
                        tiles.Add(tile);
                    }
                }
            }

            max /= 2;
            itlx /= 2;
            itly /= 2;
            ibrx /= 2;
            ibry /= 2;
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 12 Oct 2019 11:49:32 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5689#p5689</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5688#p5688</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>No, it&#039;s easy enough.</p></blockquote></div><p>I checked the API, but had no idea how to do it yet. Could you give me more tips? Thanks a lot.</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Fri, 11 Oct 2019 11:28:25 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5688#p5688</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5687#p5687</link>
			<description><![CDATA[<p>No, it&#039;s easy enough.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 11 Oct 2019 10:50:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5687#p5687</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5686#p5686</link>
			<description><![CDATA[<p>I am using Online Maps v3.5. Is it troublesome to achieve what I said by using API?</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Fri, 11 Oct 2019 10:47:17 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5686#p5686</guid>
		</item>
		<item>
			<title><![CDATA[Re: Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5685#p5685</link>
			<description><![CDATA[<p>Hello.</p><p>In Online Maps v3.6:<br />Online Maps / Advanced / Count Parent Levels - 20.</p><p>In Online Maps v3.5 or earlier, this can only be done using API.<br />Points of interest:<br />OnlineMapsTileManager.OnTileLoaded<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsTileManager.html#a799d15b4822cd5c746bb33f7070aa394">http://infinity-code.com/doxygen/online … f7070aa394</a><br />OnlineMapsTile.Block<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsTile.html#af017b50f1581047a1a38e7ba46a509b4">http://infinity-code.com/doxygen/online … ba46a509b4</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 11 Oct 2019 09:57:52 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5685#p5685</guid>
		</item>
		<item>
			<title><![CDATA[Zoom up the map and keep the image existing]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5684#p5684</link>
			<description><![CDATA[<p>Hello,<br />I used the Online Maps offline. I found that I could zoom up the map even if there was not corresponding zoom level in the Resouces folder. Certainly, the map tile was not new image but the old which became fuzzy. <br />However, when I continued to zoom up the map to some degree, the image of the map tile disappeared. <br />Is there a way to keep the image always existing?</p>]]></description>
			<author><![CDATA[null@example.com (XiaWuchu)]]></author>
			<pubDate>Fri, 11 Oct 2019 09:16:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5684#p5684</guid>
		</item>
	</channel>
</rss>
