Comments (4)
Thanks so much for your help finally I could do that perfectly. I forgot to import it in component:
import * as mapBoxGl from 'mapbox-gl';
And then:
mapBoxGl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js', () => {});
Thanks again @ryanhamley
from mapbox-gl-rtl-text.
Can you provide some information on what issue you're seeing using this with Angular 6+?
from mapbox-gl-rtl-text.
This is one of my layer and I want to use it rtlText.processBidirectionalText(text, [])
in text-field
property:
{
'id': 'titles',
'type': 'symbol',
'source': 'G_Rahro_source',
'zoom': 0.0,
'center': [0.000000, 0.000000],
'layout': {
'text-rotate': ['to-number', ['get', 'ROTATION']],
'text-field': {type: 'identity', property: 'TITLE1'},
'text-size': ['to-number', ['get', 'FONT_SIZE']],
'text-font': ['IRANSansWebFaNum Regular']
},
'paint': {
'text-color': {type: 'identity', property: 'FONT_COLOR'}
},
},
Could you explain how to use it in Angular project. I got stock in for a while. I have to get text-field
value from .geojson
file and because it is in Persian I have to make it as bidirectional.
from mapbox-gl-rtl-text.
You shouldn't need to call processBidirectionalText
directly in a function like that if you're just trying to make text render RTL. You just need to include the plugin as in this example https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/
I don't know specifics of newer Angular implementations to offer many pointers there. You might have better luck asking on Stack Overflow which is where we generally refer "how to" questions like this. But if there's something you're doing differently in your setup that's causing problems and you can replicate that outside of Angular, I'd be happy to take a look if you can reply to this thread with a JSBin or something similar.
from mapbox-gl-rtl-text.
Related Issues (14)
- Don't re-throw uncaught exceptions while running in Node environment
- how to use it with React HOT 3
- UMD export for use without mapbox HOT 1
- Deprecated: Future versions will refuse to execute script from 'mapbox-gl-rtl-text.js' because its MIME type ('binary/octet-stream') is not executable HOT 4
- using this plugin after npm installation with setRTLTextPlugin HOT 1
- Rename .js.min -> .min.js
- import with webpack is not working HOT 2
- Hash missmatch when downloading icu HOT 1
- can not load plugin from local storage HOT 1
- Uyghur language script glyph error. HOT 1
- Bad mapbox-gl dependency version documentation HOT 2
- Arabic text not displayed correctly HOT 4
- Build against specific emscripten version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-gl-rtl-text.