proximiio-js-library 1.10.2 → 1.10.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/README.md CHANGED
@@ -147,6 +147,7 @@ const map = new Proximiio.Map({
147
147
  opacity: number; // optional, default: 1, default polygon opacity
148
148
  minZoom: number; // optional, default: 17, default polygon minimum zoom visibility
149
149
  maxZoom: number; // optional, default: 24, default polygon maximum zoom visibility
150
+ textFont: string[] // optional, default: ['Amiri Bold'], define font stack to use for displaying labels, check Available fonts at the bottom
150
151
  labelFontSize: (string | number | string[])[] | number; // optional, define polygon label font size, default is interpolate expression based on zoom level
151
152
  symbolPlacement: 'point' | 'line' | 'line-center'; // optional, label placement relative to its geometry, default: 'line-center'
152
153
  autoLabelLines: boolean; // optional, default: true, if no label-line is defined in the feature metadata, if enabled it's automatically generated based on the longest polygon border
@@ -967,6 +968,34 @@ select.getSelectListener().subscribe(place => {
967
968
  });
968
969
  ```
969
970
 
971
+ ## Available fonts
972
+
973
+ - Amiri Bold
974
+ - Amiri Bold Slanted
975
+ - Amiri Regular
976
+ - Amiri Slanted
977
+ - Klokantech Noto Sans Bold
978
+ - KlokanTech Noto Sans Bold
979
+ - Klokantech Noto Sans CJK Bold
980
+ - KlokanTech Noto Sans CJK Bold
981
+ - Klokantech Noto Sans CJK Regular
982
+ - Klokantech Noto Sans Italic
983
+ - KlokanTech Noto Sans Italic
984
+ - Klokantech Noto Sans Regular
985
+ - KlokanTech Noto Sans Regular
986
+ - NeutraText-DemiSCAlt
987
+ - Noto Sans Bold
988
+ - Noto Sans Bold Italic
989
+ - Noto Sans Italic
990
+ - Noto Sans Regular
991
+ - Open Sans Bold
992
+ - Open Sans Italic
993
+ - Open Sans Regular
994
+ - Open Sans Regular,Arial Unicode MS Regular
995
+ - Open Sans Semibold
996
+ - Open Sans Semibold Italic
997
+
998
+
970
999
  ## Examples
971
1000
 
972
1001
  ### Generate route on map with select components
@@ -127,7 +127,7 @@ var PolygonTitlesLayer = /** @class */ (function (_super) {
127
127
  'text-ignore-placement': true,
128
128
  'text-allow-overlap': true,
129
129
  'text-field': '{title}',
130
- 'text-font': ['Amiri Bold'],
130
+ 'text-font': data.textFont,
131
131
  'text-size': data.labelFontSize,
132
132
  'text-letter-spacing': 0.005,
133
133
  'text-max-width': 7,
@@ -61,6 +61,7 @@ export interface Options {
61
61
  labelFontSize?: (string | number | string[])[] | number | any;
62
62
  symbolPlacement?: 'point' | 'line' | 'line-center';
63
63
  autoLabelLines?: boolean;
64
+ textFont?: string[];
64
65
  };
65
66
  zoomLevel?: number;
66
67
  considerVisibilityParam?: boolean;
@@ -183,6 +183,7 @@ var Map = /** @class */ (function () {
183
183
  // Add more stops as needed based on your data range
184
184
  ],
185
185
  ],
186
+ textFont: ['Amiri Bold'],
186
187
  symbolPlacement: 'line-center',
187
188
  autoLabelLines: true,
188
189
  },
@@ -825,7 +826,7 @@ var Map = /** @class */ (function () {
825
826
  'icon-anchor': 'bottom',
826
827
  'text-anchor': 'bottom',
827
828
  'text-offset': [0, -2.4],
828
- 'text-font': ['Amiri Bold'],
829
+ 'text-font': this.defaultOptions.polygonsOptions.textFont,
829
830
  },
830
831
  paint: {
831
832
  'text-color': '#fff',