<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Cached map area download problem]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1634&amp;type=atom" />
	<updated>2020-11-12T15:29:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1634</id>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6836#p6836" />
			<content type="html"><![CDATA[<p>Unfortunately I don&#039;t see a problem here.<br />I compared the inertia in Online Maps and the inertia in Google Maps, and I think it looks very similar.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-12T15:29:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6836#p6836</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6835#p6835" />
			<content type="html"><![CDATA[<p>The map moves jumpy on slow speed, im now using default inertia script with default 0.9 value<br /><a href="https://i.imgur.com/eH79eci.gif">https://i.imgur.com/eH79eci.gif</a></p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-12T13:16:05Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6835#p6835</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6834#p6834" />
			<content type="html"><![CDATA[<p>Please clarify what you mean by &quot;is not smooth enough&quot;?<br />I just tested this on my side and it is very smooth. Video:<br /><a href="https://www.dropbox.com/s/1fk6jetkkzjvz2g/ScreenRecorderProject4.mp4?dl=0">https://www.dropbox.com/s/1fk6jetkkzjvz … 4.mp4?dl=0</a><br />Unfortunately, the video doesn&#039;t quite convey the smoothness I have on the device.<br />But believe me, there are no freezes or lags here.<br />Maybe I&#039;m just looking in the wrong direction.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-12T12:52:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6834#p6834</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6833#p6833" />
			<content type="html"><![CDATA[<p>Yes, sorry, it was my fault, because i set parent levels to 0. Thank you very much for your help. Last question: i tried to use your example inertia but it is not smooth enough, even if i tried to use smoothdamp on speed and increasing max samples&nbsp; is there any suggestions to improve example inertia?</p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-12T12:27:43Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6833#p6833</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6832#p6832" />
			<content type="html"><![CDATA[<p>I just checked the map in all modes, and for me it only happens when Count Parent Levels - 0, which is logical, because the map unloads all previous zoom levels when the zoom changes.<br />Please show screenshots of all of your map components (including Advanced and Troubleshooting sections of the map component).</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-12T11:43:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6832#p6832</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6831#p6831" />
			<content type="html"><![CDATA[<p>i mean if i disable my script - tiles load without being gray like this <br /><a href="https://i.imgur.com/HxSrPy4.gif">https://i.imgur.com/HxSrPy4.gif</a><br />when i activate my script, there is grey tiles appear after zoom in/out<br />like this<br /><a href="https://i.imgur.com/W3hMtJq.gif">https://i.imgur.com/W3hMtJq.gif</a></p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-12T10:52:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6831#p6831</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6830#p6830" />
			<content type="html"><![CDATA[<p>I checked your code and it works correctly on my side.<br />Video:<br /><a href="https://www.dropbox.com/s/huvsmu1absm7vsy/ScreenRecorderProject3.mp4?dl=0">https://www.dropbox.com/s/huvsmu1absm7v … 3.mp4?dl=0</a></p><p>A couple of things about the video:<br />1. I disabled the cache and commented out part of the script so that tiles are loaded only from your path.<br />2. I set Count Parent Tiles to 0 so that parent tiles do not affect the view of the map, and tiles are unloaded when zoom in, and loaded again when zoom out.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-12T10:32:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6830#p6830</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6829#p6829" />
			<content type="html"><![CDATA[<p>sure, <a href="https://pastebin.com/56JHhDue">https://pastebin.com/56JHhDue</a></p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-12T09:10:00Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6829#p6829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6827#p6827" />
			<content type="html"><![CDATA[<p>Please show your code where you load the tiles.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-12T08:52:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6827#p6827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6826#p6826" />
			<content type="html"><![CDATA[<p>ty for your help, it working great now, but the problem now is that there are grey tiles on reload, but there it was working better before loading from my source, how to make smooth reload tiles on zoom?</p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-12T08:50:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6826#p6826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6824#p6824" />
			<content type="html"><![CDATA[<p>No, you cannot add items to the tile cache or atlas. The cache is simply not designed for this.</p><p>No, you don&#039;t have to resolve it manually.</p><p>How tile loading works:<br />1. If a tile is in the cache, it is loaded from the cache.<br />2. If someone has subscribed to OnStartDownloadTile, this event is called, where you can load the tile yourself or do some action, and continue downloading using the built-in downloader. If you loaded a tile yourself, then it is not cached.<br />3. If the settings indicate that a tile should be loaded from Resources or Streaming Assets, the tile is searched for in these folders.<br />4. The tile is loaded from the Internet.</p><p>So you need to subscribe to OnStartDownloadTile, and download the tile from your folder.</p><p>How to get the provider id:<br /></p><div class="codebox"><pre><code>private void OnStartDownloadTile(OnlineMapsTile tile)
{
    // ...
    
    OnlineMapsRasterTile rTile = tile as OnlineMapsRasterTile;
    string provider_id = rTile.mapType.provider.id;

    // ...
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-11T11:10:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6824#p6824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6823#p6823" />
			<content type="html"><![CDATA[<p>The problem is that i want to store files at cache folder because i want to save different providers for offline usage, also can i manually add downloaded textures to atlas? <br />Or i should manually resolve the cases when i have inet conection to use cache normally and no inet conection and use my own folders?</p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-11T10:42:16Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6823#p6823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6822#p6822" />
			<content type="html"><![CDATA[<p>Intercept requests to load tiles this way ...<br /><a href="https://infinity-code.com/atlas/online-maps/pages/CustomDownloadTileExample.html">https://infinity-code.com/atlas/online- … ample.html</a><br />... and read the tiles from your path.</p><p>Tip: do not use the cache folder for your tiles, because this will create two problems:<br />1. The cache will not load and/or delete these files because they are not in the atlas.<br />2. If you delete them yourself, then how do you know if this file is not in the atlas, which can create dead records in the atlas.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-11T10:35:26Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6822#p6822</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6820#p6820" />
			<content type="html"><![CDATA[<p>yes, i save in application data path and permissions are ok, the path is like:<br />C:\Users\User\AppData\LocalLow\companyName\appName\OnlineMapsCache\TileCache\osm\mapnik\le\en\17\76550<br />for example, and map does not switch to 17 zoom at all, while i ve downloaded this area</p>]]></content>
			<author>
				<name><![CDATA[wththd]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1446</uri>
			</author>
			<updated>2020-11-11T10:15:25Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6820#p6820</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cached map area download problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=6819#p6819" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Where do you save the data in the script you implemented? To Resources folder?<br />You don&#039;t have write access to Resources after build.<br />Typically, Application.persistentDataPath folder is used for these purposes.<br /><a href="https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html">https://docs.unity3d.com/ScriptReferenc … aPath.html</a></p><p>TileDownloader stores tiles in persistentDataPath.</p><p>The cache is also not stored in Resources, and the file cache tries to load only the tiles that are present in the atlas.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-11T09:44:41Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=6819#p6819</id>
		</entry>
</feed>
