@panoramax/web-viewer 3.1.1-develop-4687b4f6 → 3.1.1-develop-2701b828

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.1.1-develop-4687b4f6",
3
+ "version": "3.1.1-develop-2701b828",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
package/src/utils/Map.js CHANGED
@@ -181,7 +181,9 @@ export function combineStyles(parent, options) {
181
181
 
182
182
  // Override labels to use appropriate language
183
183
  if(style.metadata["panoramax:locales"]) {
184
- const prefLang = autoDetectLocale(style.metadata["panoramax:locales"], "latin");
184
+ let prefLang = parent._options.lang || autoDetectLocale(style.metadata["panoramax:locales"], "latin");
185
+ if(prefLang.includes("-")) { prefLang = prefLang.split("-")[0]; }
186
+ if(prefLang.includes("_")) { prefLang = prefLang.split("_")[0]; }
185
187
  style.layers.forEach(l => {
186
188
  if(isLabelLayer(l) && l.layout["text-field"].includes("name:latin")) {
187
189
  l.layout["text-field"] = [