Replace the field with the most features with a 'default' field.
(mapping: TypeStyleMapping)
| 933 | |
| 934 | @staticmethod |
| 935 | def _set_default_key(mapping: TypeStyleMapping) -> None: |
| 936 | """Replace the field with the most features with a 'default' field.""" |
| 937 | key_longest = max(mapping, key=mapping.get) # type: ignore |
| 938 | mapping["default"] = key_longest |
| 939 | del mapping[key_longest] |
| 940 | |
| 941 | |
| 942 | class TopoJson(JSCSSMixin, Layer): |