You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Map.ts
+27-28Lines changed: 27 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -304,7 +304,7 @@ export class Map extends maplibregl.Map {
304
304
[0,"transparent"],
305
305
[1,"transparent"],
306
306
],
307
-
scale: 0,
307
+
scale: 1,
308
308
});
309
309
return;
310
310
}
@@ -1015,18 +1015,16 @@ export class Map extends maplibregl.Map {
1015
1015
if(styleInfo.isFallback){
1016
1016
if(this.getStyle()){
1017
1017
console.warn(
1018
-
"Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead.",
1018
+
"[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead.",
1019
1019
);
1020
1020
returnthis;
1021
1021
}
1022
1022
1023
1023
console.warn(
1024
-
"Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style.",
1024
+
"[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style.",
1025
1025
);
1026
1026
}
1027
1027
1028
-
this.styleInProcess=true;
1029
-
1030
1028
// because the style must be finished loading and parsed before we can add custom layers
1031
1029
// we need to check if the terrain has changed, because if it has, we also need to wait
1032
1030
// for the terrain to load...
@@ -1035,6 +1033,7 @@ export class Map extends maplibregl.Map {
1035
1033
1036
1034
try{
1037
1035
super.setStyle(styleInfo.style,options);
1036
+
this.styleInProcess=true;
1038
1037
}catch(e){
1039
1038
this.styleInProcess=false;
1040
1039
console.error("[Map.setStyle]: Error while setting style:",e);
@@ -1047,7 +1046,8 @@ export class Map extends maplibregl.Map {
0 commit comments