Using Malette

var malette = new Malette(container, options);


Option Type Default Description Example(s)
style {object} {} Default style object for Malette to manipulate; returns updated style object.
formatIn {string} esri-json This tells Malette what style format is being fed to the styler. esri-json, css
formatOut {string} esri-json This tells Malette what type of style object to produce. esri-json, css
exportStyle {boolean} false Setting export to true will enable the Malette export UI for style generation.
type {string} point Enables Malette to make UI decisions based on layer type being styled. point, line, polygon
title {string} null Passing a title to malette will render said tital in the style UI, nice for layer refence.

Thematic and Graduated Styles

Required Type Default Description
fields {array} Array of possible fields to style on.
The fields requirement is an array of attributes on a layer with statistics for that field, i.e.:
  fields = [
      alias: 'fieldNameAlias',
      name: 'name',
      statistics: {
        avg: 100,
        min: 10,
        max: 500,
        stddev: 1.2
        var: 3
      type: 'esriFieldTypeDouble'
    { ... }


Name Description
style-change Fires when any change is made to the Malette style object.