Select to view content in your preferred language

I am using esri-leaflet as mapping library and using vectorTileLayer to add custom basemap however struggling with arabic text that is breaking

564
1
10-12-2023 12:23 AM
OwaisNadeem
New Contributor
getWeatherMap() {
    if(this.map){
      this.map.remove();
    }
    const saudiArabiaCenter = [45.0792, 23.8859];
    this.map = L.map(`map`, {
      center: L.latLng(saudiArabiaCenter[1], saudiArabiaCenter[0]),
      zoom: 6,
      minZoom: 3,
      extent: [4034389.34, 1606584.16, 6328654.48, 3423574.81]
    });



      const baseMapEsriLayer = new esriVector.VectorTileLayer("example/vectorTileServer", {
      apikey: "xyz",
      pane: 'basemap',
      style: (style) => {
        style.layers.forEach((layer) => {
          if (layer.layout && layer.layout['text-font']) {
            layer.layout['text-font'] = ['Arial Regular']
          }
        });

        console.log(style);

        return style;
      }
    });

  }

So far I have tried changing fonts by modfiying font-family but no luck as arabic text is still break. Changing font that is available system or available in Esri vector tile server but no luck. if the font is not available the layers got failed to load.

0 Kudos
1 Reply
OwaisNadeem
New Contributor

it sad to see no one is here to help

0 Kudos