Region
Hierarchy
- MapObject
- Region
Index
Constructors
Properties
Methods
- adjustBubbleScreenPosition
- adjustLabelScreenPosition
- adjustStroke
- attr
- deselect
- drawBubble
- forTemplate
- getBBox
- getBubbleSize
- getCenter
- getCenterLatLng
- getCenterSVG
- getChoroplethColor
- getComputedStyle
- getData
- getDisabledState
- getGeoBounds
- getModel
- getOptions
- getStyle
- highlight
- isCluster
- isMarker
- isRegion
- moveBubbleScreenPositionBy
- moveLabelScreenPositionBy
- select
- setBubbleScreenPosition
- setData
- setDisabled
- setFill
- setId
- setLabelScreenPosition
- setSelected
- setStatus
- setStylesByState
- setTitle
- setchoroplethValue
- unhighlight
- update
- getComputedStyle
Constructors
constructor
Parameters
params: RegionParams
Returns Region
Properties
bubble
optionalcenter
choroplethValue
customAttrs
optionaldata
optionaldetails
disabled
elem
elemOriginal
element
events
optionalfill
gaugeValue
hovered
id
id_no_spaces
initialState
label
mapsvg
name
objects
options
optionalpopover
selected
status
statusOptions
style
styleByState
styleSvg
optionaltitle
optionaltooltip
type
Methods
adjustBubbleScreenPosition
Adjust position of Region bubble
Returns void
adjustLabelScreenPosition
Adjust position of Region Label
Returns void
adjustStroke
Parameters
scale: number
Returns void
attr
Sets attribute of an SVG object
Parameters
v1: any
attribute name or object:
{name: value, name: value}
v2: any = null
value
Returns string
deselect
Deselect the Region.
Returns void
drawBubble
Draw a choropleth bubble for the region
Returns void
forTemplate
Returns an object with properties of the Region formatted for a template
Returns any
getBBox
Returns SVG bounding box of the Region
Returns ViewBox
- [x,y,width,height]
getBubbleSize
Returns size of the choropleth bubble
Returns any
getCenter
Returns center of an object in pixel coordinates
Returns ScreenPoint
- [x,y]
getCenterLatLng
Returns center of an object in geo-coordinates
Parameters
yShift: any
Returns GeoPoint
getCenterSVG
Returns center of an object in SVG coordinates
Returns SVGPoint
getChoroplethColor
Returns color of the Region for choropleth map
Returns string
color
getComputedStyle
Returns style of a given property of an SVG object
Parameters
prop: string
property name
optionalelem: HTMLElement | SVGElement
SVG object
Returns string
- style
getData
Returns any
getDisabledState
Checks if Region should be disabled
Parameters
optionalasDefault: boolean
Returns boolean
getGeoBounds
getModel
Returns Model
getOptions
Returns Region properties
Parameters
optionalforTemplate: boolean
adds special properties for use in a template
Returns {}
[key string]: any
getStyle
Returns style of a property of the SVG object
Parameters
prop: string
property name
Returns string
highlight
Highlight the Region. Used on mouseover.
Returns void
isCluster
Returns this is MarkerCluster
isMarker
Returns this is Marker
isRegion
Returns this is Region
moveBubbleScreenPositionBy
Set position of Region bubble by given numbers
Parameters
deltaX: any
deltaY: any
Returns void
moveLabelScreenPositionBy
Set position of Region Label by given numbers
Parameters
deltaX: any
deltaY: any
Returns void
select
Select the Region.
Returns void
setBubbleScreenPosition
Set position of Region bubble by given numbers
Parameters
x: any
y: any
Returns void
setData
Adds custom data loaded from server
Parameters
data: Model
Any set of
{key:value}
pairs
Returns void
setDisabled
Disables the Region.
Parameters
optionalon: boolean
true/false = disable/enable
optionalskipSetFill: boolean
If false, color of the Region will not be changed
Returns void
setFill
Sets the fill color for the Region
Parameters
fill: string
The fill color to set
Returns void
setId
Set ID of an object
Parameters
id: string
Returns void
setLabelScreenPosition
Set position of Region Labels by given numbers
Parameters
x: any
y: any
Returns void
setSelected
Selects the Region.
Parameters
selected: boolean
Returns void
setStatus
Sets status of the Region. Takes the list of statuses from global MapSVG options.
Parameters
status: string | number
Returns boolean
setStylesByState
Parameters
styleByState: RegionStylesByStatusOptions
deepMergeFlag: boolean = true
Returns void
setTitle
Sets Title of the Region
Parameters
optionaltitle: string
Returns void
setchoroplethValue
Set Region choropleth value. Used to calculate color of the Region.
Parameters
val: number
Returns void
unhighlight
Unhighlight the Region. Used on mouseout.
Returns void
update
Updates the Region
Parameters
options: any
Returns void
staticgetComputedStyle
Parameters
prop: string
optionalelem: HTMLElement | SVGElement
Returns string
Region class. Contains a reference to an SVG element.