<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Is it possible to create different zones?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2058&amp;type=atom" />
	<updated>2024-01-10T15:45:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2058</id>
		<entry>
			<title type="html"><![CDATA[Re: Is it possible to create different zones?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9341#p9341" />
			<content type="html"><![CDATA[<p>If it&#039;s a question for me, it&#039;s not the right question.<br />I provide technical support for the asset, and only that.<br />I can&#039;t help with game design questions.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-01-10T15:45:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9341#p9341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is it possible to create different zones?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8729#p8729" />
			<content type="html"><![CDATA[<p>Something like that?<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsSupport
{
    public class OtherStyleInArea : MonoBehaviour
    {
        public double leftLongitude = -10;
        public double rightLongitude = 10;
        public double topLatitude = 10;
        public double bottomLatitude = -10;
        public string otherStyle = &quot;osm.mapnik&quot;;

        private OnlineMapsProvider.MapType mapType;

        private void Start()
        {
            mapType = OnlineMapsProvider.FindMapType(otherStyle);
            if (mapType != null)
            {
                OnlineMapsTileManager.OnPrepareDownloadTile += OnPrepareDownloadTile;
            }
        }

        private void OnPrepareDownloadTile(OnlineMapsTile tile)
        {
            OnlineMapsVector2d tl = tile.topLeft;
            OnlineMapsVector2d br = tile.bottomRight;

            if (tl.x &lt; leftLongitude &amp;&amp; br.x &lt; leftLongitude ||
                tl.x &gt; rightLongitude &amp;&amp; br.x &gt; rightLongitude ||
                tl.y &lt; bottomLatitude &amp;&amp; br.y &lt; bottomLatitude ||
                tl.y &gt; topLatitude &amp;&amp; br.y &gt; topLatitude) return;

            (tile as OnlineMapsRasterTile).mapType = mapType;
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-11-16T08:53:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8729#p8729</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is it possible to create different zones?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8728#p8728" />
			<content type="html"><![CDATA[<p>I&#039;m making a location based game and I would like to know if it is possible to make a script that will change the style of the map only on a certain area?</p>]]></content>
			<author>
				<name><![CDATA[Azrod]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2321</uri>
			</author>
			<updated>2022-11-15T21:05:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8728#p8728</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is it possible to create different zones?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8726#p8726" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Unfortunately, I didn&#039;t understand your question.<br />Please rephrase this in more detail.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-11-15T17:52:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8726#p8726</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Is it possible to create different zones?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8725#p8725" />
			<content type="html"><![CDATA[<p>Hello I would like to know if it is possible to define specific places on the map to create different zones with the Online Maps v3 asset in unity? Like for exemple combining 2 differents map style automatically</p>]]></content>
			<author>
				<name><![CDATA[Azrod]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2321</uri>
			</author>
			<updated>2022-11-15T17:49:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8725#p8725</id>
		</entry>
</feed>
