@orbat-mapper/tactical-draw-adapter-maplibre 0.2.0-alpha.18 → 0.2.0-alpha.19

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.
Files changed (2) hide show
  1. package/dist/index.mjs +19 -7
  2. package/package.json +2 -1
package/dist/index.mjs CHANGED
@@ -103,7 +103,8 @@ function buildIconLayer(id, source) {
103
103
  "icon-rotation-alignment": "viewport",
104
104
  "icon-pitch-alignment": "viewport",
105
105
  "icon-allow-overlap": true,
106
- "icon-ignore-placement": true
106
+ "icon-ignore-placement": true,
107
+ "symbol-z-order": "source"
107
108
  },
108
109
  paint: { "icon-opacity": [
109
110
  "coalesce",
@@ -461,7 +462,8 @@ function buildSymbolLayer(symbolId, sourceId, text) {
461
462
  "text-max-width": 9999,
462
463
  "text-rotation-alignment": "map",
463
464
  "text-pitch-alignment": "map",
464
- "text-allow-overlap": true
465
+ "text-allow-overlap": true,
466
+ "symbol-z-order": "source"
465
467
  },
466
468
  paint: {
467
469
  "text-color": textColor,
@@ -553,6 +555,15 @@ function buildLinePaint(style) {
553
555
  ["get", "style"],
554
556
  ["literal", {}]
555
557
  ];
558
+ const dashExpr = [
559
+ "coalesce",
560
+ [
561
+ "get",
562
+ "strokeDash",
563
+ styleObj
564
+ ],
565
+ ["literal", dashDefault]
566
+ ];
556
567
  return {
557
568
  "line-color": [
558
569
  "coalesce",
@@ -573,13 +584,14 @@ function buildLinePaint(style) {
573
584
  widthDefault
574
585
  ],
575
586
  "line-dasharray": [
576
- "coalesce",
587
+ "case",
577
588
  [
578
- "get",
579
- "strokeDash",
580
- styleObj
589
+ ">",
590
+ ["length", dashExpr],
591
+ 0
581
592
  ],
582
- ["literal", dashDefault]
593
+ dashExpr,
594
+ ["literal", SOLID_LINE_DASH]
583
595
  ]
584
596
  };
585
597
  }
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.18",
3
+ "version": "0.2.0-alpha.19",
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",
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@arethetypeswrong/core": "^0.18.3",
48
+ "@maplibre/maplibre-gl-style-spec": "^24.10.0",
48
49
  "@types/geojson": "^7946.0.16",
49
50
  "jsdom": "^27.4.0",
50
51
  "maplibre-gl": "^5.24.0",