@orbat-mapper/tactical-draw-adapter-maplibre 0.2.0-alpha.2 → 0.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +17 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -136,6 +136,22 @@ function buildSymbolLayer(symbolId, sourceId, text) {
|
|
|
136
136
|
],
|
|
137
137
|
"#000"
|
|
138
138
|
];
|
|
139
|
+
const textAnchor = text.labelProperty ? [
|
|
140
|
+
"case",
|
|
141
|
+
[
|
|
142
|
+
"==",
|
|
143
|
+
["get", "textAnchor"],
|
|
144
|
+
"start"
|
|
145
|
+
],
|
|
146
|
+
"left",
|
|
147
|
+
[
|
|
148
|
+
"==",
|
|
149
|
+
["get", "textAnchor"],
|
|
150
|
+
"end"
|
|
151
|
+
],
|
|
152
|
+
"right",
|
|
153
|
+
"center"
|
|
154
|
+
] : "center";
|
|
139
155
|
return {
|
|
140
156
|
id: symbolId,
|
|
141
157
|
type: "symbol",
|
|
@@ -145,6 +161,7 @@ function buildSymbolLayer(symbolId, sourceId, text) {
|
|
|
145
161
|
"text-font": ["Open Sans Regular"],
|
|
146
162
|
"text-size": buildTextSizeExpression(),
|
|
147
163
|
"text-rotate": textRotate,
|
|
164
|
+
"text-anchor": textAnchor,
|
|
148
165
|
"text-rotation-alignment": "map",
|
|
149
166
|
"text-pitch-alignment": "map",
|
|
150
167
|
"text-allow-overlap": true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbat-mapper/tactical-draw-adapter-maplibre",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "MapLibre GL JS engine adapter for @orbat-mapper/tactical-draw. Draw and edit tactical control measures (MIL-STD-2525 / APP-6) on a MapLibre map.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Orbat Mapper",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@orbat-mapper/control-measures": "^0.2.0-alpha.
|
|
41
|
-
"@orbat-mapper/tactical-draw": "^0.2.0-alpha.
|
|
40
|
+
"@orbat-mapper/control-measures": "^0.2.0-alpha.9",
|
|
41
|
+
"@orbat-mapper/tactical-draw": "^0.2.0-alpha.12"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"maplibre-gl": ">=4.0.0 <6.0.0"
|