-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deferred loading of RTL text plugin detects labels rendered from GeoJ…
…SON sources (#9091)
- Loading branch information
Arindam Bose
authored
Dec 16, 2019
1 parent
dc3cfa2
commit d9e9ffe
Showing
7 changed files
with
97 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SymbolBucket from '../../src/data/bucket/symbol_bucket'; | ||
import SymbolStyleLayer from '../../src/style/style_layer/symbol_style_layer'; | ||
import featureFilter from '../../src/style-spec/feature_filter'; | ||
|
||
export function createSymbolBucket(layerId, font, text, collisionBoxArray) { | ||
const layer = new SymbolStyleLayer({ | ||
id: layerId, | ||
type: 'symbol', | ||
layout: {'text-font': [font], 'text-field': text}, | ||
filter: featureFilter() | ||
}); | ||
layer.recalculate({zoom: 0, zoomHistory: {}}); | ||
|
||
return new SymbolBucket({ | ||
overscaling: 1, | ||
zoom: 0, | ||
collisionBoxArray, | ||
layers: [layer] | ||
}); | ||
} |