-
Notifications
You must be signed in to change notification settings - Fork 22
add rtl text plug in #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add rtl text plug in #141
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,16 @@ import { | |
| StyleImageMetadata, | ||
| } from 'maplibre-gl'; | ||
| import { Map as MapType, Style } from 'maplibre-gl'; | ||
| import maplibregl from 'maplibre-gl'; | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we must move this to its own hook. Let's call it Please take a look at the useAddProtocol hook which might have a similar implementation 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. |
||
| maplibregl.setRTLTextPlugin( | ||
| 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', | ||
| (res) => { | ||
| console.log(res); | ||
| }, | ||
| true // Lazy load the plugin | ||
| ); | ||
|
|
||
|
|
||
| type WrapperEventArgArray = [string, (arg0: unknown) => void]; | ||
| type EventArgArray = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.