L.esri.Vector.setRTLTextPlugin

This method of Esri Leaflet Vector allows you to provide a plugin that configures settings for right-to-left languages, such as Arabic and Hebrew. The most commonly passed option is the Mapbox GL RTL Text plugin, which Esri Leaflet Vector is compatible with since it uses Maplibre GL JS.

Method

MethodDescription
L.esri.Vector.setRTLTextPlugin(<String> url, <ErrorCallback> callback, <Boolean> deferred)

url : The URL of a library compatible with MapLibre GL JS, such as Mapbox GL RTL Text, that configures RTL language support.

Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
const basemap = L.esri.Vector.vectorBasemapLayer('arcgis/outdoor',{
    token:accessToken,
    language:'ar' // Arabic
}).addTo(map);

L.esri.Vector.setRTLTextPlugin('https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.js');

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.