This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 8096af7  Add maplibre RTL text plugin to the demonstration
8096af7 is described below

commit 8096af7000170aab4641ea407ee0537c18b63515
Author: Bertil Chapuis <[email protected]>
AuthorDate: Thu Jun 1 20:24:28 2023 +0200

    Add maplibre RTL text plugin to the demonstration
---
 public/demo.html | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/public/demo.html b/public/demo.html
index b5f2334..a424044 100644
--- a/public/demo.html
+++ b/public/demo.html
@@ -55,6 +55,15 @@
 <script src="https://buttons.github.io/buttons.js"; 
crossorigin="anonymous"></script>
 <script>
 
+  // Load the right-to-left plugin if necessary.
+  if (maplibregl.getRTLTextPluginStatus() === 'unavailable') {
+    maplibregl.setRTLTextPlugin(
+            
'https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js',
+            null,
+            true
+    );
+  }
+
   // Initialize the map
   var map = new mapboxgl.Map({
     container: 'map',

Reply via email to