Topic: Is it possible to create different zones?

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

Re: Is it possible to create different zones?

Hello.

Unfortunately, I didn't understand your question.
Please rephrase this in more detail.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Is it possible to create different zones?

I'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?

Re: Is it possible to create different zones?

Something like that?

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 = "osm.mapnik";

        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 < leftLongitude && br.x < leftLongitude ||
                tl.x > rightLongitude && br.x > rightLongitude ||
                tl.y < bottomLatitude && br.y < bottomLatitude ||
                tl.y > topLatitude && br.y > topLatitude) return;

            (tile as OnlineMapsRasterTile).mapType = mapType;
        }
    }
}
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Is it possible to create different zones?

If it's a question for me, it's not the right question.
I provide technical support for the asset, and only that.
I can't help with game design questions.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.