M/style/Proportional~Proportional


import Proportional from 'M/style/Proportional';

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

new Proportional(attributeName, minRadius, maxRadius)

facade/js/style/Proportional.js, line 68
Name Type Description
attributeName String
minRadius StylePoint
maxRadius object

Extends

  • M.Style

Members

module:M/style/Proportional~Proportional.SCALE_PROPORTION

This constant defines the scale proportion for iconstyle in Proportional.

attributeName_{String}

TODO

ORDER

This constant defines the order of style.

Methods

applyInternal(layer)

facade/js/style/Proportional.js, line 137

This function apply the style to specified layer

Name Type Description
layer M.Layer.Vector

Layer where to apply choropleth style

applyToFeature(layer)

facade/js/style/Proportional.js, line 149

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/Proportional.js, line 416

TODO

Name Type Description
vectorContext CanvasRenderingContext2D

context of style canvas

getAttributeName(){String}

facade/js/style/Proportional.js, line 216

This function returns the attribute name defined by user

Returns:
attribute name of Style

getMaxRadius(){number}

facade/js/style/Proportional.js, line 319

This function get the maximum radius of the style point

Returns:
maximum radius of style point

getMinRadius(){number}

facade/js/style/Proportional.js, line 268

This function get the minimum radius of the style point

Returns:
minimum radius of style point

getProportionalFunction(){number}

facade/js/style/Proportional.js, line 291

This function get proportional function

Returns:
minimum radius of style point

setAttributeName(attributeName)

facade/js/style/Proportional.js, line 227

This function set the attribute name defined by user

Name Type Description
attributeName String

attribute name to set

setMaxRadius(minRadius)

facade/js/style/Proportional.js, line 330

This function set the maximum radius of the style point

Name Type Description
minRadius number

maximum radius of style point

setMinRadius(minRadius)

facade/js/style/Proportional.js, line 302

This function set the minimum radius of the style point

Name Type Description
minRadius number

minimum radius of style point

setProportionalFunction(proportionalFunction)

facade/js/style/Proportional.js, line 279

This function set proportional function

Name Type Description
proportionalFunction function

proportional function

setStyle(style)

facade/js/style/Proportional.js, line 255

This function set the style point defined by user

Name Type Description
style StylePoint

style point to set

toJSON(){object}

facade/js/style/Proportional.js, line 531

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

updateCanvas()

facade/js/style/Proportional.js, line 347

This function updates the canvas of style