BlazorLeaflet icon indicating copy to clipboard operation
BlazorLeaflet copied to clipboard

Move options to separate types

Open chucker opened this issue 5 years ago • 0 comments

The Map class risks gaining a lot of properties, which seems a bit unwieldy to me.

Leaflet itself has an Options type, e.g. map.options.zoomDelta rather than map.zoomDelta directly. Moreover, its documentation categorizes those options: control, interaction, etc.

Maybe we should follow suit and create separate types LeafletControlOptions, LeafletStateOptions, etc.

Then the user could do:

_map.ControlOptions.ZoomControl = true;
_map.StateOptions = new LeafletStateOptions { MinZoom = 5, MaxZoom = 13 };

chucker avatar May 27 '20 18:05 chucker