Topic: Stamen with Labels

Hi, i love the map style: Stamen Watercolor but It haven’t the labels. I’ve seen online that Stamen can have also the Labels.

Is there a way to have watercolors with Labels?
Here an example:

https://openlayers.org/en/latest/examples/stamen.html

Thanks,
Paolo

Re: Stamen with Labels

Hello.

Example:

using UnityEngine;

public class StamenLabels : MonoBehaviour
{
    private void Start()
    {
        OnlineMapsTileManager.OnTileLoaded += OnTileLoaded;
    }

    private void OnTileLoaded(OnlineMapsTile tile)
    {
        OnlineMapsWWW www = new OnlineMapsWWW($"https://stamen-tiles-a.a.ssl.fastly.net/terrain-labels/{tile.zoom}/{tile.x}/{tile.y}.png");
        www.OnComplete += w =>
        {
            if (!w.hasError)
            {
                Texture2D texture = new Texture2D(256, 256, TextureFormat.ARGB32, false);
                w.LoadImageIntoTexture(texture);
                texture.wrapMode = TextureWrapMode.Clamp;
                tile.overlayBackTexture = texture;
                OnlineMaps.instance.Redraw();
            }
        };
    }
}
Kind Regards,
Infinity Code Team.

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

Re: Stamen with Labels

Thanks, Alex. Where I must put this script? I've try to put in Map but nothing changed.

Many thanks,
Paolo

Re: Stamen with Labels

Here is a short video about it:
https://www.dropbox.com/s/60juv9cr0994k … s.mp4?dl=0

Kind Regards,
Infinity Code Team.

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

Re: Stamen with Labels

Thanks, Alex. I think the problem is always on the shaders.
In last post, you suggested me to change the tile shader from TILESET SHADER to LEGACY SHADERS/DIFFUSE because on some iPhone I can't see any map. It was solved the problem.

Now, if I use TilesetShader (your shader standard) I can see the name of the city... if I use LEGACY SHADERS/DIFFUSE (in Tileset shader) I can't see any text on map.

Any idea?

Thanks,
Paolo

Re: Stamen with Labels

This is because Legacy/Diffuse does not have overlay layers.

You have four ways:
1. Use shaders that support overlay (Tileset and Tileset Cutout).
3. Try switching to URP. Online Maps has shaders for it, and it's quite possible that this will solve both of your problems.
2. Create your own shader with overlay layers.
4. Merge two textures (base and overlay) on the CPU. Not recommended because it will take CPU time and memory to merge textures

Kind Regards,
Infinity Code Team.

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

Re: Stamen with Labels

Thanks, but why in OpenStreetMap -> Mapnik (with Legacy Diffuse) all works (name of the city and map) on any iPhone?

Re: Stamen with Labels

Because the text in OSM tiles is drawn in the texture itself, and in Stamen these are two textures (base without text and text with a transparent background).

Kind Regards,
Infinity Code Team.

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

Re: Stamen with Labels

Ok, Alex.
I hope to find a solution because your asset can't show very well on every iPhone and this can be a distribution problem.

Many thanks,
Paolo smile