@maptrip/map-tiles 1.4.0 → 1.5.0

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.
@@ -79,6 +79,7 @@ class VectorTileRenderer {
79
79
  );
80
80
 
81
81
  this.drawTilePhase(polygons, z, boundaries, context, "areas", collisions);
82
+ // add phase areasOutline here if polygon outlines should be rendered
82
83
  this.drawPolylineLayers(lines, z, boundaries, context, "", collisions);
83
84
  this.drawTilePhase(points, z, boundaries, context, "texts", collisions);
84
85
  this.drawTilePhase(lines, z, boundaries, context, "lineTexts", collisions);
@@ -119,6 +120,14 @@ class VectorTileRenderer {
119
120
  "linesOutline",
120
121
  collisions
121
122
  );
123
+ }
124
+
125
+ for (let i = 0; i < rank.length; i++) {
126
+ // select all lines with this sort rank
127
+ let currentRank = lines.filter(
128
+ (it) => parseInt(it.properties!.sort_rank) === rank[i]
129
+ );
130
+
122
131
  this.drawTilePhase(
123
132
  currentRank,
124
133
  z,
@@ -129,7 +138,7 @@ class VectorTileRenderer {
129
138
  );
130
139
  }
131
140
  }
132
-
141
+
133
142
  drawErroredTile(canvas: HTMLCanvasElement): void {
134
143
  var context = canvas.getContext("2d");
135
144
  if (context != null) {
@@ -306,12 +315,18 @@ class VectorTileRenderer {
306
315
  collisions
307
316
  )
308
317
  ) {
309
- const match = text.match(/([A-Z])\s?([0-9]+[a-z]*).*/);
318
+ const match = text.match(/([a-zA-Z])\s?([0-9]+[a-z]*).*/);
310
319
  if (match) {
311
320
  const letter = match[1];
312
321
  const number = match[2];
313
- if (letter === "A" || letter === "B") {
314
- text = number;
322
+
323
+ // Stadsroutes are major roads in some cities in the Netherlands and start with s.
324
+ // Adding them here will render them like Bundesstraßen in Germany.
325
+ // If country-dependent rendering is added, it should be a white box with black border and text.
326
+
327
+ if (letter === "A" || letter === "B" || letter === "s") {
328
+ text = letter === "A" || letter === "B" ? number : letter + number;
329
+
315
330
  this.drawImage(
316
331
  coordinates,
317
332
  boundaries,
@@ -430,7 +445,6 @@ class VectorTileRenderer {
430
445
 
431
446
  context.globalAlpha = merged.opacity;
432
447
 
433
- /// XXX edit here
434
448
  if ('areas' !== phase || j === 0) {
435
449
  // when rendering areas, only the first part of a polygon should begin a path
436
450
  // (otherwise especially islands are clipped on some zoom levels)
@@ -675,48 +689,69 @@ class VectorTileRenderer {
675
689
 
676
690
  // draw images on the line (e.g. arrows for one-way roads)
677
691
  if (merged.url && this._images[merged.url]) {
678
- var desired = 40; // XXX config
679
- var distance = Math.round(desired / 2);
692
+ const desiredDistance: number = 40;
693
+ const margin: number = Math.round(desiredDistance / 2);
694
+
695
+ let totalLength = 0;
696
+ for (let i = 0; i < points.length - 1; i++) {
697
+ totalLength += Math.hypot(
698
+ points[i + 1].x - points[i].x,
699
+ points[i + 1].y - points[i].y
700
+ );
701
+ }
702
+
703
+ let distance: number = margin;
704
+ let traveled: number = 0;
680
705
 
681
706
  for (var i = 0; i < points.length - 1; i++) {
682
707
  // calculate angle of this section of the line
683
- var dx = points[i + 1].x - points[i].x;
684
- var dy = points[i + 1].y - points[i].y;
685
- var angle = Math.atan2(dy, dx);
708
+ const dx: number = points[i + 1].x - points[i].x;
709
+ const dy: number = points[i + 1].y - points[i].y;
710
+ let angle: number = Math.atan2(dy, dx);
686
711
 
687
712
  if (merged.direction != "reverse") {
688
713
  angle = angle + Math.PI;
689
714
  }
690
715
 
691
716
  // now calculate equidistant points on the polyline
692
- var distanceToNext = Math.sqrt(dx * dx + dy * dy);
717
+ const distanceToNext: number = Math.sqrt(dx * dx + dy * dy);
693
718
  while (distance < distanceToNext) {
694
719
  // there are more points on this section of the line
695
- var f = distance / distanceToNext;
696
720
 
697
- var x = points[i].x + f * dx;
698
- var y = points[i].y + f * dy;
721
+ if (traveled + distance <= totalLength - margin) {
699
722
 
700
- context.save();
723
+ const f: number = distance / distanceToNext;
701
724
 
702
- context.translate(x, y);
703
- context.rotate(angle);
704
- context.translate(-x, -y);
725
+ const x: number = points[i].x + f * dx;
726
+ const y: number = points[i].y + f * dy;
727
+
728
+ const size: number = Math.max(12, 1.5 * merged.width);
705
729
 
706
- context.drawImage(
707
- this._images[merged.url],
708
- x + merged.dx,
709
- y + merged.dy,
710
- Number(merged.width),
711
- Number(merged.height)
712
- );
730
+ if (x > size && y > size && x < VECTOR_TILE_SIZE - size && y < VECTOR_TILE_SIZE - size) {
731
+ context.save();
713
732
 
714
- context.restore();
733
+ context.translate(x, y);
734
+ context.rotate(angle);
735
+ context.translate(-x, -y);
715
736
 
716
- distance += desired;
737
+ context.drawImage(
738
+ this._images[merged.url],
739
+ x - size / 2,
740
+ y - size / 2,
741
+ size,
742
+ size,
743
+ );
744
+
745
+ context.restore();
746
+ }
747
+
748
+ }
749
+ distance += desiredDistance;
717
750
  }
718
751
 
719
- distance = (desired - (distanceToNext - distance)) % desired;
752
+ traveled += distanceToNext;
753
+ distance -= distanceToNext;
754
+ // distance = (desiredDistance - (distanceToNext - distance)) % desiredDistance;
720
755
  }
721
756
  }
722
757
  }
@@ -943,7 +978,7 @@ class VectorTileRenderer {
943
978
  outline: number,
944
979
  context: CanvasRenderingContext2D
945
980
  ): void {
946
- var width = context.measureText(letter).width + outline; // XXX
981
+ var width = context.measureText(letter).width + outline;
947
982
 
948
983
  var x = position.x + 0.5 * Math.cos(position.angle) * width;
949
984
  var y = position.y + 0.5 * Math.sin(position.angle) * width;
@@ -215,7 +215,7 @@ const RENDERING_CONFIG_DEFAULT = {
215
215
  from: 1,
216
216
  to: 19,
217
217
  polygon: {
218
- color: "#e6e6e6",
218
+ color: "rgba(0, 0, 0, 0.05)",
219
219
  },
220
220
  },
221
221
  ],
@@ -769,6 +769,8 @@ const RENDERING_CONFIG_DEFAULT = {
769
769
  line: {
770
770
  width: 7,
771
771
  color: "#ffffff",
772
+ outlineColor: "#cccccc",
773
+ outlineWidth: 1,
772
774
  },
773
775
  text: {
774
776
  size: 12,
@@ -807,13 +809,12 @@ const RENDERING_CONFIG_DEFAULT = {
807
809
  from: 17,
808
810
  to: 19,
809
811
  line: {
810
- width: 10,
812
+ width: 7,
811
813
  color: "#ffffff",
812
814
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
813
- height: 6,
814
- dx: -5,
815
- dy: -3,
816
815
  direction: "forward",
816
+ outlineColor: "#cccccc",
817
+ outlineWidth: 1,
817
818
  },
818
819
  text: {
819
820
  size: 12,
@@ -852,13 +853,12 @@ const RENDERING_CONFIG_DEFAULT = {
852
853
  from: 17,
853
854
  to: 19,
854
855
  line: {
855
- width: 10,
856
+ width: 7,
856
857
  color: "#ffffff",
857
858
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
858
- height: 6,
859
- dx: -5,
860
- dy: -3,
861
859
  direction: "reverse",
860
+ outlineColor: "#cccccc",
861
+ outlineWidth: 1,
862
862
  },
863
863
  text: {
864
864
  size: 12,
@@ -898,7 +898,7 @@ const RENDERING_CONFIG_DEFAULT = {
898
898
  to: 19,
899
899
  line: {
900
900
  width: 2,
901
- color: "#A5ADB8",
901
+ color: "#B0B9C4",
902
902
  },
903
903
  text: {
904
904
  size: 12,
@@ -913,7 +913,7 @@ const RENDERING_CONFIG_DEFAULT = {
913
913
  to: 16,
914
914
  line: {
915
915
  width: 1,
916
- color: "#A5ADB8",
916
+ color: "#B0B9C4",
917
917
  },
918
918
  text: {
919
919
  size: 12,
@@ -928,7 +928,7 @@ const RENDERING_CONFIG_DEFAULT = {
928
928
  to: 14,
929
929
  line: {
930
930
  width: 1,
931
- color: "#A5ADB8",
931
+ color: "#B0B9C4",
932
932
  },
933
933
  },
934
934
  ],
@@ -937,7 +937,7 @@ const RENDERING_CONFIG_DEFAULT = {
937
937
  from: 17,
938
938
  to: 19,
939
939
  line: {
940
- width: 2,
940
+ width: 3,
941
941
  color: "#ffffff",
942
942
  },
943
943
  text: {
@@ -969,12 +969,9 @@ const RENDERING_CONFIG_DEFAULT = {
969
969
  from: 17,
970
970
  to: 19,
971
971
  line: {
972
- width: 10,
972
+ width: 3,
973
973
  color: "#ffffff",
974
974
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
975
- height: 6,
976
- dx: -5,
977
- dy: -3,
978
975
  direction: "forward",
979
976
  },
980
977
  text: {
@@ -1006,12 +1003,9 @@ const RENDERING_CONFIG_DEFAULT = {
1006
1003
  from: 17,
1007
1004
  to: 19,
1008
1005
  line: {
1009
- width: 10,
1006
+ width: 3,
1010
1007
  color: "#ffffff",
1011
1008
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
1012
- height: 6,
1013
- dx: -5,
1014
- dy: -3,
1015
1009
  direction: "reverse",
1016
1010
  },
1017
1011
  text: {
@@ -1045,7 +1039,7 @@ const RENDERING_CONFIG_DEFAULT = {
1045
1039
  line: {
1046
1040
  width: 2,
1047
1041
  color: "rgba(1, 1, 1, 0)",
1048
- dashColor: "#A5ADB8",
1042
+ dashColor: "#B0B9C4",
1049
1043
  dashLength: 6,
1050
1044
  },
1051
1045
  text: {
@@ -1059,11 +1053,22 @@ const RENDERING_CONFIG_DEFAULT = {
1059
1053
  ],
1060
1054
  rail: [
1061
1055
  {
1062
- from: 13,
1056
+ from: 16,
1063
1057
  to: 19,
1058
+ line: {
1059
+ width: 2,
1060
+ color: "#8B8C8C",
1061
+ dashColor: "#FAFAFA",
1062
+ dashLength: 10,
1063
+ },
1064
+ },
1065
+ {
1066
+ from: 12,
1067
+ to: 15,
1064
1068
  line: {
1065
1069
  width: 1,
1066
- color: "#d4d4d4",
1070
+ color: "#8B8C8C",
1071
+ dashLength: 10,
1067
1072
  },
1068
1073
  },
1069
1074
  ],
@@ -1072,7 +1077,7 @@ const RENDERING_CONFIG_DEFAULT = {
1072
1077
  from: 17,
1073
1078
  to: 19,
1074
1079
  line: {
1075
- width: 5,
1080
+ width: 3,
1076
1081
  color: "#74a8e1",
1077
1082
  },
1078
1083
  text: {
@@ -1087,7 +1092,7 @@ const RENDERING_CONFIG_DEFAULT = {
1087
1092
  from: 14,
1088
1093
  to: 16,
1089
1094
  line: {
1090
- width: 3,
1095
+ width: 2,
1091
1096
  color: "#74a8e1",
1092
1097
  },
1093
1098
  text: {
@@ -1102,7 +1107,7 @@ const RENDERING_CONFIG_DEFAULT = {
1102
1107
  from: 10,
1103
1108
  to: 13,
1104
1109
  line: {
1105
- width: 2,
1110
+ width: 1,
1106
1111
  color: "#74a8e1",
1107
1112
  },
1108
1113
  },
@@ -215,7 +215,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
215
215
  from: 1,
216
216
  to: 19,
217
217
  polygon: {
218
- color: "#e6e6e6",
218
+ color: "rgba(0, 0, 0, 0.05)",
219
219
  },
220
220
  },
221
221
  ],
@@ -272,7 +272,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
272
272
  width: 1,
273
273
  },
274
274
  polygon: {
275
- color: "#c5c5c5",
275
+ color: "#BBC5CF",
276
276
  },
277
277
  text: {
278
278
  size: 14,
@@ -769,6 +769,8 @@ const RENDERING_CONFIG_GRAYSCALE = {
769
769
  line: {
770
770
  width: 7,
771
771
  color: "#ffffff",
772
+ outlineColor: "#cccccc",
773
+ outlineWidth: 1,
772
774
  },
773
775
  text: {
774
776
  size: 12,
@@ -807,13 +809,12 @@ const RENDERING_CONFIG_GRAYSCALE = {
807
809
  from: 17,
808
810
  to: 19,
809
811
  line: {
810
- width: 10,
812
+ width: 7,
811
813
  color: "#ffffff",
812
814
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
813
- height: 6,
814
- dx: -5,
815
- dy: -3,
816
815
  direction: "forward",
816
+ outlineColor: "#cccccc",
817
+ outlineWidth: 1,
817
818
  },
818
819
  text: {
819
820
  size: 12,
@@ -852,13 +853,12 @@ const RENDERING_CONFIG_GRAYSCALE = {
852
853
  from: 17,
853
854
  to: 19,
854
855
  line: {
855
- width: 10,
856
+ width: 7,
856
857
  color: "#ffffff",
857
858
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
858
- height: 6,
859
- dx: -5,
860
- dy: -3,
861
859
  direction: "reverse",
860
+ outlineColor: "#cccccc",
861
+ outlineWidth: 1,
862
862
  },
863
863
  text: {
864
864
  size: 12,
@@ -897,7 +897,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
897
897
  from: 17,
898
898
  to: 19,
899
899
  line: {
900
- width: 4,
900
+ width: 2,
901
901
  color: "#cccccc",
902
902
  },
903
903
  text: {
@@ -935,7 +935,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
935
935
  from: 17,
936
936
  to: 19,
937
937
  line: {
938
- width: 2,
938
+ width: 3,
939
939
  color: "#ffffff",
940
940
  },
941
941
  text: {
@@ -967,12 +967,9 @@ const RENDERING_CONFIG_GRAYSCALE = {
967
967
  from: 17,
968
968
  to: 19,
969
969
  line: {
970
- width: 10,
970
+ width: 3,
971
971
  color: "#ffffff",
972
972
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
973
- height: 6,
974
- dx: -5,
975
- dy: -3,
976
973
  direction: "forward",
977
974
  },
978
975
  text: {
@@ -1004,12 +1001,9 @@ const RENDERING_CONFIG_GRAYSCALE = {
1004
1001
  from: 17,
1005
1002
  to: 19,
1006
1003
  line: {
1007
- width: 10,
1004
+ width: 3,
1008
1005
  color: "#ffffff",
1009
1006
  url: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImFycm93IiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwIDY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDpub25lO3N0cm9rZTojOUI5QTlBO308L3N0eWxlPjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjUuOSw1LjEgOS4xLDMgNS45LDAuOSIvPjxsaW5lIGNsYXNzPSJzdDAiIHgxPSI5LjEiIHkxPSIzIiB4Mj0iMC45IiB5Mj0iMyIvPjwvc3ZnPg==",
1010
- height: 6,
1011
- dx: -5,
1012
- dy: -3,
1013
1007
  direction: "reverse",
1014
1008
  },
1015
1009
  text: {
@@ -1043,7 +1037,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
1043
1037
  line: {
1044
1038
  width: 2,
1045
1039
  color: "rgba(1, 1, 1, 0)",
1046
- dashColor: "#A5ADB8",
1040
+ dashColor: "#cccccc",
1047
1041
  dashLength: 6,
1048
1042
  },
1049
1043
  text: {
@@ -1057,11 +1051,22 @@ const RENDERING_CONFIG_GRAYSCALE = {
1057
1051
  ],
1058
1052
  rail: [
1059
1053
  {
1060
- from: 13,
1054
+ from: 16,
1061
1055
  to: 19,
1056
+ line: {
1057
+ width: 2,
1058
+ color: "#8B8C8C",
1059
+ dashColor: "#FAFAFA",
1060
+ dashLength: 10,
1061
+ },
1062
+ },
1063
+ {
1064
+ from: 12,
1065
+ to: 15,
1062
1066
  line: {
1063
1067
  width: 1,
1064
- color: "#d4d4d4",
1068
+ color: "#8B8C8C",
1069
+ dashLength: 10,
1065
1070
  },
1066
1071
  },
1067
1072
  ],
@@ -1070,7 +1075,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
1070
1075
  from: 17,
1071
1076
  to: 19,
1072
1077
  line: {
1073
- width: 5,
1078
+ width: 3,
1074
1079
  color: "#9e9e9e",
1075
1080
  },
1076
1081
  text: {
@@ -1085,7 +1090,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
1085
1090
  from: 14,
1086
1091
  to: 16,
1087
1092
  line: {
1088
- width: 3,
1093
+ width: 2,
1089
1094
  color: "#9e9e9e",
1090
1095
  },
1091
1096
  text: {
@@ -1100,7 +1105,7 @@ const RENDERING_CONFIG_GRAYSCALE = {
1100
1105
  from: 10,
1101
1106
  to: 13,
1102
1107
  line: {
1103
- width: 2,
1108
+ width: 1,
1104
1109
  color: "#9e9e9e",
1105
1110
  },
1106
1111
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptrip/map-tiles",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "API to use MapTrip map tiles in other map APIs",
5
5
  "keywords": [
6
6
  "map",
@@ -19,10 +19,10 @@
19
19
  "types": "dist/map-tiles.d.ts",
20
20
  "scripts": {
21
21
  "dev": "vite src",
22
- "prepublish": "tsc",
23
22
  "build": "tsc && vite build",
24
- "check-updates": "npm outdated || echo 'All dependencies are up to date'",
25
- "publish": "npm run check-updates && vite build && npm login --scope=@maptrip && npm publish"
23
+ "check-updates": "npm outdated",
24
+ "prepublishOnly": "npm run build && npm login --scope=@maptrip",
25
+ "release": "npm publish --access public"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@googlemaps/js-api-loader": "^1.16.2",