<?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 — How to import map into Online maps？]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=734</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=734&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to import map into Online maps？.]]></description>
		<lastBuildDate>Wed, 03 Jan 2018 15:55:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3190#p3190</link>
			<description><![CDATA[<p>No, this map can not be used via «Provider - Custom», because it has offsets (zoom, x, y).</p><p>As is - this has limited usage via Online Maps API.<br />This means that getting the coordinates will not work correctly.</p><p>To getting the coordinates work correctly, you need to make that your tiles match to WGS84 tiles.<br /><a href="http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/">http://www.maptiler.org/google-maps-coo … rojection/</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 03 Jan 2018 15:55:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3190#p3190</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3189#p3189</link>
			<description><![CDATA[<p>Can this map be imported by &quot;Provider - Custom&quot; ?<br /><a href="http://www.cjyhgl.com:6080/arcgis/rest/services/basemap5/MapServer">http://www.cjyhgl.com:6080/arcgis/rest/ … /MapServer</a></p>]]></description>
			<author><![CDATA[null@example.com (unity_project)]]></author>
			<pubDate>Wed, 03 Jan 2018 15:33:57 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3189#p3189</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3185#p3185</link>
			<description><![CDATA[<p>Something like:<br /></p><div class="codebox"><pre><code>using System;
using System.Text;
using UnityEngine;

public class HuadongArcGIS:MonoBehaviour
{
    private int zoomOffset = 6;
    private int xOffset = 22;
    private int yOffset = 1;

    private OnlineMaps map;

    private void Start()
    {
        map = OnlineMaps.instance;
        map.OnStartDownloadTile += OnStartDownloadTile;
        if (OnlineMapsCache.instance != null) OnlineMapsCache.instance.OnStartDownloadTile += OnStartDownloadTile;
    }

    private void OnStartDownloadTile(OnlineMapsTile tile)
    {
        int zoom = tile.zoom - zoomOffset;
        if (zoom &lt; 0)
        {
            tile.status = OnlineMapsTileStatus.error;
            return;
        }

        tile.status = OnlineMapsTileStatus.loading;

        StringBuilder builder = new StringBuilder(&quot;http://www.cjyhgl.com:6080/arcgis/rest/services/huadong1/MapServer/tile/&quot;);
        builder.Append(zoom).Append(&quot;/&quot;).Append(tile.y - yOffset * (1 &lt;&lt; zoom)).Append(&quot;/&quot;).Append(tile.x - xOffset * (1 &lt;&lt; zoom));

        OnlineMapsWWW www = OnlineMapsUtils.GetWWW(builder);
        www.OnComplete += delegate
        {
            if (string.IsNullOrEmpty(www.error))
            {
                Texture2D tileTexture = new Texture2D(256, 256, TextureFormat.ARGB32, map.control.mipmapForTiles);
                tileTexture.LoadImage(www.bytes);
                tileTexture.wrapMode = TextureWrapMode.Clamp;

                if (map.target == OnlineMapsTarget.texture)
                {
                    tile.ApplyTexture(tileTexture);
                    map.buffer.ApplyTile(tile);
                    OnlineMapsUtils.DestroyImmediate(tileTexture);
                }
                else
                {
                    tile.texture = tileTexture;
                    tile.status = OnlineMapsTileStatus.loaded;
                }

                tile.MarkLoaded();
                map.Redraw();
            }
            else
            {
                tile.status = OnlineMapsTileStatus.error;
            }
        };
    }
}</code></pre></div><p>But keep in mind that your tiles do not match WGS84 tiles, and getting the coordinates will not work correctly.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 01 Jan 2018 17:21:00 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3185#p3185</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3183#p3183</link>
			<description><![CDATA[<p>Thanks for your answer, i want to import 6 tiles for making up my map. The URL of my tiles are:<br /><a href="http://www.cjyhgl.com:6080/arcgis/rest/services/huadong1/MapServer/tile/0/23/30">http://www.cjyhgl.com:6080/arcgis/rest/ … le/0/23/30</a>, ../0/23/31, ../0/24/30, ../24.31, ../25/30, <br />../25/31, how do I import 6 tiles by URLs and adjust the position of 6 tiles?</p>]]></description>
			<author><![CDATA[null@example.com (unity_project)]]></author>
			<pubDate>Mon, 01 Jan 2018 13:10:54 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3183#p3183</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3174#p3174</link>
			<description><![CDATA[<p>&quot;Provider - Custom&quot; can load multiple tiles.<br />To do this, you replace in URL the numbers (zoom, tile x, tile y) to tokens ({zoom}, {x}, {y}).<br />But &quot;Provider - Custom&quot; can not work with zoom offset.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 29 Dec 2017 12:37:46 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3174#p3174</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3172#p3172</link>
			<description><![CDATA[<p>Thanks for your reminder, I can import the tile into unity via URL by changing the map to WGS-84. But I want to know, using &quot;Provider-custom&quot; can only import one tile? What should I do if I want to import multiple tiles?</p>]]></description>
			<author><![CDATA[null@example.com (unity_project)]]></author>
			<pubDate>Fri, 29 Dec 2017 06:38:31 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3172#p3172</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3170#p3170</link>
			<description><![CDATA[<p>1. Online Maps has built-in support only for WGS-84 (Ellipsoid Mercator) and WGS-84 WebMercator (Spherical Mercator) projections.<br />Your tiles use Lambert Conformal Conic.<br />Theoretically, you can implement your own projection, and use it for the map.<br />Points of interest:<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsProjection.html">http://infinity-code.com/doxygen/online … ction.html</a><br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsProvider.html#a5bc413959816424e1d07801ef1b24402">http://infinity-code.com/doxygen/online … 1ef1b24402</a></p><p>2. Your tiles have zoom offset = 8.<br />You can download tiles with a offset only using Online Maps API.<br /><a href="http://infinity-code.com/atlas/online-maps/pages/CustomDownloadTileExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 28 Dec 2017 08:04:44 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3170#p3170</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3168#p3168</link>
			<description><![CDATA[<p>Thanks for your answer，but my URL is something different from the URL in the documentation,&nbsp; <br />here is one of my tail&#039;s URL: <a href="http://www.cjyhgl.com:6080/arcgis/rest/services/huadong/MapServer/tile/0/85/69">http://www.cjyhgl.com:6080/arcgis/rest/ … le/0/85/69</a><br />In step 7,&nbsp; &nbsp;&quot;In the «URL» replace «!1iX!2iX!3iX», to «! 1i{zoom}!2i{x}!3i{y}».&quot; should i change my URL by replacing /0/85/69 to!1i{0}!2i{85}!3i{69}<br />and my URL change to like&nbsp; ...st/services/huadong/MapServer/tile/!1i{0}!2i{85}!3i{69}?<br />and in step 8, &quot;Make sure URL ends at «!4e0» (inclusive). If you have characters after this, delete them.&quot; , my URL doesn&#039;t have !4e0, How should I modify my URL to meet the requirements</p>]]></description>
			<author><![CDATA[null@example.com (unity_project)]]></author>
			<pubDate>Thu, 28 Dec 2017 02:48:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3168#p3168</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3166#p3166</link>
			<description><![CDATA[<p>Hello.</p><p>Select &quot;Provider - Custom&quot;, and specify the URL of the tiles.<br />Step-by-step instructions on how to find this URL in the documentation (section Styled Google Maps).</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 27 Dec 2017 05:55:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3166#p3166</guid>
		</item>
		<item>
			<title><![CDATA[How to import map into Online maps？]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3164#p3164</link>
			<description><![CDATA[<p>I&#039;m a novice in Online maps, I&#039;ve used Arcgis to generate the map, and upload maps to Arcgis server. I can use my browser to open the map URL.<br />&nbsp; I want to know how to import my Arcgis map into Unity by Online maps, whether using local map files or online URL?</p>]]></description>
			<author><![CDATA[null@example.com (unity_project)]]></author>
			<pubDate>Tue, 26 Dec 2017 12:08:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3164#p3164</guid>
		</item>
	</channel>
</rss>
