Select

Constructor

new Select()

Custom Leaflet control which will display a select box. Selecing an item in the first box will populate the second. Selecting an item in the second box will update the map.

Options:

  • id Unique id for the control
  • position The location on the map (using leaflet's standard control positions). Default: topleft
  • collapse True to show a button until clicked, then show the select box; false to just show the select box. Default: false
  • label The label for the select box (and the title the button when collapse=true). Default: 'Select...'
  • items array of items (key/value) to be displayed in the dropdown
  • selectionAction Function callback to invoke when the selection changes
  • iconClass The CSS class(es) for the button icon (if collapse=true). Default: 'fa fa-list'
  • selectClass The CSS class(es) for the select box. Default: 'leaflet-select'