Skip to content

legendControls

andy.rothwell edited this page Aug 28, 2018 · 7 revisions

legendControls Configuration

Used to set up LegendControls for topics which include overlay layers.

Options

options definition
topics you can put in a list
showWithBaseMapOnly use this for things that only show up on the basemap, and not imagery

Example:

legendControls: {
  water: {
    options: {
      topics: ['water'],
      showWithBaseMapOnly: false
    },
    data: {
      'Roof': {
        'background-color': '#FEFF7F',
      },
      'Other Impervious Surface': {
        'background-color': '#F2DCFF',
      }
    }
  },
  deeds: {
    options: {
      topics: ['deeds', 'zoning'],
      showWithBaseMapOnly: true
    },
    data: {
      'Easements': {
        'border-color': 'rgb(255, 0, 197)',
        'border-style': 'solid',
        'border-weight': '1px',
        'width': '12px',
        'height': '12px',
        'font-size': '10px',
      },
      'Trans Parcels': {
        'border-color': 'rgb(0, 168, 132)',
        'border-style': 'solid',
        'border-weight': '1px',
        'width': '12px',
        'height': '12px',
        'font-size': '10px',
      },
      'Rights of Way': {
        'border-color': 'rgb(249, 147, 0)',
        'border-style': 'solid',
        'border-weight': '1px',
        'width': '12px',
        'height': '12px',
        'font-size': '10px',
      }
    }
  }
},
Clone this wiki locally