Topic: PLease insert this if I am wrong

Resources.Load<Texture2D>(string.Format("OnlineMapsOverlay/{0}/{1}/{2}", tile.zoom, tile.x,tile.y));
Noting is worked may be I have syntax error.
can you insert this into above format I awant to overlay this ... only need format...
http://services.arcgisonline.com/arcgis … m}/{y}/{x}


....................
Resources.Load<Texture2D>(string.Format("http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{0}/{1}/{2}", tile.zoom, tile.x,tile.y));
???
Resources.Load<Texture2D>(string.Format("http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{0}/{1}/{2}.png", tile.zoom, tile.x,tile.y));
????
etcccc

Re: PLease insert this if I am wrong

Hello.

Resources.Load - loads an asset stored at path in a Resources folder.
https://docs.unity3d.com/ScriptReferenc … .Load.html

If you want to load overlay from the url, use OnlineMapsUtils.GetWWW.
http://infinity-code.com/doxygen/online … 8f230fe2ca

Kind Regards,
Infinity Code Team.

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

Re: PLease insert this if I am wrong

I can not achive, I am not C# expert why do not you give me one line code sample ?
http://tile2.opencyclemap.org/Outdoors/ … x}/{y}.png
could you please insert this line in the code of ...
TilesetMapTilerOverlayExample.cs .Thanks...

Re: PLease insert this if I am wrong

Hello.

Full example below.
This example is made for Online Maps v2.4. The new method is much shorter, faster and easier.
So, if you use Online Maps v2.3, please update through the built-in update system.

Why do you want to use it as an overlay?
This overlay completely hide the map, and can be used as base tiles.

Example:

using System.Collections.Generic;
using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    public class TilesetMapTilerOverlayExample3 : MonoBehaviour
    {
        private List<OverlayItem> loadingOverlays;

        private void CheckDownloadComplete()
        {
            bool hasComplete = false;
            foreach (OverlayItem data in loadingOverlays)
            {
                if (data.www.isDone)
                {
                    if (string.IsNullOrEmpty(data.www.error))
                    {
                        Texture2D texture = new Texture2D(256, 256, TextureFormat.ARGB32, false);
                        data.www.LoadImageIntoTexture(texture);
                        data.tile.overlayBackTexture = texture;
                    }
                    data.Dispose();
                    hasComplete = true;
                }
            }

            if (hasComplete) loadingOverlays.RemoveAll(d => d.tile == null);
        }

        private void OnStartDownloadTile(OnlineMapsTile tile)
        {
            loadingOverlays.Add(new OverlayItem(tile));
            OnlineMaps.instance.StartDownloadTile(tile);
        }

        private void Start()
        {
            loadingOverlays = new List<OverlayItem>();
            OnlineMaps.instance.OnStartDownloadTile += OnStartDownloadTile;
        }

        private void Update()
        {
            CheckDownloadComplete();
        }

        internal class OverlayItem
        {
            public OnlineMapsWWW www;
            public OnlineMapsTile tile;

            public OverlayItem(OnlineMapsTile tile)
            {
                this.tile = tile;
                www = OnlineMapsUtils.GetWWW(string.Format("http://tile2.opencyclemap.org/Outdoors/{0}/{1}/{2}.png", tile.zoom, tile.x, tile.y));
            }

            public void Dispose()
            {
                www.Dispose();
                www = null;
                tile = null;
            }
        }
    }
}
Kind Regards,
Infinity Code Team.

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