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
| collapsed | If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation. | Boolean | - | true |
44
+
| autoZIndex | If `true`, the control will assing zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off. | Boolean | - | true |
45
+
| hideSingleBase | If `true`, the base layers in the control will be hidden when there is only one. | Boolean | - | false |
46
+
| sortLayers | Whether to sort the layers. When `false`, layers will keep the order in which they were added to the control. | Boolean | - | false |
47
+
| sortFunction | A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) that will be used for sorting the layers, when `sortLayers` is `true`. The function receives both the [L.Layer](https://leafletjs.com/reference.html#layer) instances and their names, as in `sortFunction(layerA, layerB, nameA, nameB)`. By default, it sorts layers alphabetically by their name. | Function | - | * |
| maxWidth | Maximum width of the control in pixels. The width is set dynamically to show round values (eg. 100, 200, 500). | Number | - | 100 |
44
+
| metric | Whether to show the metric scale line (m/km). | Boolean | - | true |
45
+
| imperial | Whether to show the imperial scale line (mi/ft). | Boolean | - | true |
46
+
| updateWhenIdle | If `true`, the control is updated on [moveend](https://leafletjs.com/reference.html#map-moveend), otherwise it's always up-to-date (updated on [move](https://leafletjs.com/reference.html#map-move)). | Boolean | - | false |
0 commit comments