Skip to content

Commit 4abdb98

Browse files
fix a crash where no active referenceLayer was active during base map style switch
1 parent 4d5535b commit 4abdb98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arcgis_map_sdk_web/lib/src/layer_controller.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,8 @@ class LayerController {
12721272
}),
12731273
);
12741274

1275+
if (labelsLayerUrl == null) return;
1276+
12751277
// By recreating the labels layer, it allows us to push it to the back of the map.
12761278
_recreatedLabelsLayer =
12771279
VectorLayer().init(url: labelsLayerUrl!, apiKey: apiKey);

0 commit comments

Comments
 (0)