Conversation
add plugin Mapbox ttl
| @@ -1,5 +1,16 @@ | |||
| import { IControl, MapOptions as MapOptionsType } from "!maplibre-gl"; | |||
| import { Map as MapType } from "maplibre-gl"; | |||
| import maplibreGl from "maplibre-gl"; | |||
There was a problem hiding this comment.
please remove all changes of this file. All files under the ./dist/ folder are autogenerated during the build process (yarn build). No manual changes required.
| } from 'maplibre-gl'; | ||
| import { Map as MapType, Style } from 'maplibre-gl'; | ||
| import maplibregl from 'maplibre-gl'; | ||
|
|
There was a problem hiding this comment.
I think we must move this to its own hook. Let's call it useSetRtlTextPlugin (what a beautiful name :)).
This way we can use it optionally when we actually need it.
Please take a look at the useAddProtocol hook which might have a similar implementation
https://github.com/mapcomponents/react-map-components-maplibre/blob/main/src/hooks/useAddProtocol/useAddProtocol.tsx
Make the actual RTL-plugin URL a property of the hook with the current one you have in there as default value. That way it will be easy to use and still offer a way to use a custom RTL plugin.
the map has an issue it rerenders Arabic words from left to right
I fixed it by adding an RTL plugin to maplibre using mapbox-style link