M/style/Choropleth~Choropleth


import Choropleth from 'M/style/Choropleth';

Main constructor of the class. Creates a style choropleth with parameters specified by the user

new Choropleth(attributeName, styles, quantification, options)

facade/js/style/Choropleth.js, line 56
Name Type Description
attributeName String
styles Array.<Style>
quantification Style.quantification
options object

Extends

  • Style

Members

module:M/style/Choropleth~Choropleth.END_COLOR_DEFAULT

Color style by default

module:M/style/Choropleth~Choropleth.START_COLOR_DEFAULT

Color style by default

attributeName_{String}

TODO

breakPoints_

choroplethStyles_{Array.<Style.Simple>}

dataValues_{Array.<Number>}

ORDER

This constant defines the order of style.

quantification_{M.quantification} {function}

Methods

module:M/style/Choropleth~Choropleth.DEFAULT_STYLE(c){Style.Point}

facade/js/style/Choropleth.js, line 391

This functions returns a point style by default

Name Type Description
c String

color in hexadecimal format

applyInternal(layer)

facade/js/style/Choropleth.js, line 111

This function apply the style to specified layer

Name Type Description
layer M.Layer.Vector

Layer where to apply choropleth style

drawGeometryToCanvas(vectorContext)

facade/js/style/Choropleth.js, line 285

TODO

Name Type Description
vectorContext CanvasRenderingContext2D

context of style canvas

getAttributeName(){String}

facade/js/style/Choropleth.js, line 123

This function return the attribute name defined by user

Returns:
attribute name of Style

getChoroplethStyles(){Array(Style)|null}

facade/js/style/Choropleth.js, line 189

This function returns the styles defined by user

Returns:
returns the styles defined by user

getQuantification(){Style.quantification|function}

facade/js/style/Choropleth.js, line 148

This function return quantification function defined by user

Returns:
quantification function of style

getValues(){Array.<number>}

facade/js/style/Choropleth.js, line 329

This function gets the numeric features values of layer which attribute is equal to attribute specified by user

Returns:
numeric features values of layer

setAttributeName(attributeName)

facade/js/style/Choropleth.js, line 134

This function set the attribute name defined by user

Name Type Description
attributeName String

attribute name to set

setQuantification(quantification)

facade/js/style/Choropleth.js, line 159

This function set quantification function defined by user

Name Type Description
quantification Style.quantification | function

quantification function of style

setStyles(styles)

facade/js/style/Choropleth.js, line 200

This function sets the styles defined by user

Name Type Description
styles Array.<StylePoint> | Array.<StyleLine> | Array.<StylePolygon>

styles defined by user

toJSON(){object}

facade/js/style/Choropleth.js, line 456

This function implements the mechanism to generate the JSON of this instance

updateCanvas()

facade/js/style/Choropleth.js, line 219

TODO