MapArea
Type class
Extension for MapObject to define individual settings for each area defined in the SVG map. It overwrites the settings obtained from AreasSettings.
Example
```js var map = AmCharts.makeChart("mapdiv",{ ... "dataProvider": { "map": "worldHigh", "areas": [ { "id": "LT", "showAsSelected": true } ] } });```Sources
This information about MapArea is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
MapArea extends MapObject.
MapArea is not extended by any other symbol.
Properties
autoZoomType
booleanDefaultfalseSpecifies if the area should be zoomed-in when user clicks on it, even if zoom properties are not set.
idType
stringId of the area in SVG file.
outlineType
booleanDefaultfalseSome areas can serve only as outlines. If you set this property to true, this area will not be filled, will not receive mouse events and will always stay above all other areas.
outlineAlphaType
numberOpacity of area's outline.
outlineColorType
colorColor of area's outline.
outlineThicknessType
numberThickness of area's outline.
patternType
objectValue of pattern should be object with url, width, height of an image, optionally it might have x, y, randomX and randomY values. For example: {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4}. Check ammap/patterns folder for some patterns. You can create your own patterns and use them.
rollOverOutlineColorType
colorColor of area's outline when user rolls-over it.
valueType
numberValue of the area. Areas will be filled with color range from AreasSettings.color to AreasSettings.colorSolid, depending on the value.
36 inherited items
accessibleLabelType
stringInherited fromMapObjectText which screen readers will read if user rolls-over the object or sets focus using tab key (this is possible only if tabIndex property of object settings or individual object is set to some number). Text is added as aria-label tag. Note - not all screen readers and browsers support this.
alphaType
numberInherited fromMapObjectOpacity of map object.
balloonTextType
stringInherited fromMapObjectText which is displayed in a roll-over balloon. You can use the following tags:
title,description,valueandpercent.To disable the balloons, set it to an empty string.
bringForwardOnHoverType
booleanInherited fromMapObjectSpecifies if the object should change it's z-index to the top-most when user hovers it.
colorType
colorInherited fromMapObjectColor of MapObject
customDataType
objectInherited fromMapObjectA custom data holder.
descriptionType
stringInherited fromMapObjectDescription of MapObject. Description is displayed in DescriptionWindow (when user clicks on an object). It can also be displayed in a roll-over balloon. DescriptionWindow can display HTML formatted code.
descriptionWindowBottomInherited from
MapObjectDistance from the bottom side of map container to the description window. In case it is not set (also if descriptionWindowTop is not set), window will be placed near the mouse pointer.
descriptionWindowHeightType
numberInherited fromMapObjectHeight of description window.
descriptionWindowLeftType
numberInherited fromMapObjectDistance from the left side of map container to the description window. In case it is not set (also if descriptionWindowRight is not set), window will be placed near the mouse pointer.
descriptionWindowRightInherited from
MapObjectDistance from the right side of map container to the description window. In case it is not set (also if descriptionWindowLeft is not set), window will be placed near the mouse pointer.
descriptionWindowTopType
numberInherited fromMapObjectDistance from the top side of map container to the description window. In case it is not set (also if descriptionWindowBottom is not set), window will be placed near the mouse pointer.
descriptionWindowWidthType
numberInherited fromMapObjectWidth of description window.
fixedSizeType
booleanDefaulttrueInherited fromMapObjectSpecifies if the object should change the size together with the map or keep fixed size. This applies for objects with lat and long properties set, as they move together with the map.
groupIdType
stringInherited fromMapObjectId of a group. You can group MapObjects to groups. Grouped objects will change color together with this object when you roll-over it or click it. You can show/hide them using showGroup(groupId) and hideGroup(groupId) methods of AmMap class. You can also use map.zoomToGroup(groupId) methot to zoom-in the map so that all grouped objects are visible.
imagesType
MapImage[]Inherited fromMapObjectArray of MapImage objects.
linesType
MapLine[]Inherited fromMapObjectArray of MapLine objects.
linkToObjectType
MapObjectInherited fromMapObjectlinkToObject can be a reference or id of some other MapObject - MapArea, MapImage or MapLine. It can also be a reference to another DataSet (but not an id). Then user clicks on this object the application would zoom-in to this objects' zoom position (if it is set) and then act as if the linkToObject was clicked. This can also be used for selecting the object you want to be selected right after the map is initialized, as DataSet extends MapObject class, you can specify linkToObject for your DataSet. When you link to another DataSet, you can build drill-down maps.
mouseEnabledType
booleanDefaulttrueInherited fromMapObjectSet this to false to make the object be irresponsive to any interactions like hover or click events.
passZoomValuesToTargetType
booleanDefaultfalseInherited fromMapObjectSpecifies if current zoom values should be passed to target MapObject. Useful when building drill down maps.
remainVisibleType
booleanDefaulttrueInherited fromMapObjectSpecifies if the MapObject and other objects of the same level should remain visible if it was clicked and it has children MapObjects.
rollOverColorType
colorInherited fromMapObjectRoll over color of of the object.
selectableType
booleanDefaultfalseInherited fromMapObjectSpecifies if the object can be selected even if it is not clickable. Map object is clickable if zoom properties are set or it has description or has children objects. Sometimes even non of the listed conditions is met you might need it to be clickable. You should set this property to true in this case.
selectedColorType
colorInherited fromMapObjectColor of an object when it is selected (somebody clicked on it).
showAsSelectedType
booleanDefaultfalseInherited fromMapObjectSpecifies if selectedColor should be applied to the object. AmMap can have only one selected item at a time, however there might be situations when multiple objects (areas, images, lines) have to look like they are selected. By setting this property to true, you will be able to produce this result.
showInListType
booleanInherited fromMapObjectSpecifies if this object must be displayed in ObjectsList Title should be defined in order the object to appear there.
tabIndexType
numberInherited fromMapObjectIn case you set it to some number, the map will set focus on this object when user clicks tab key. When a focus is set, screen readers like NVDA Screen reader will read label which is set using accessibleLabel property of object settings or individual object. If object is clickable, pressing Enter/Return while focus is set will select the object. Note, not all browsers and readers support this.
titleType
stringInherited fromMapObjectTitle of a MapObject. It can be displayed in the roll-over balloon and in the header of description window. All areas in SVG maps distributed with amMap has country names (titles) hard coded in the SVG file.
urlType
stringInherited fromMapObjectUrl of an object. The application will go to this url when you click on the object.
urlTargetType
stringDefault_selfInherited fromMapObjectTarget of an URL, if URL is a string, for example: "_blank", "_top".
useTargetsZoomValuesType
booleanDefaultfalseInherited fromMapObjectIf set to
truethe map will carry over the same zoom values when transitioning to new data provider. Useful when building drill down maps.zoomLatitudeType
numberInherited fromMapObjectSpecifies latitude to which map should be moved when this object is clicked
zoomLevelType
numberInherited fromMapObjectSpecifies map scale to which map should be rescaled when this object is clicked.
zoomLongitudeType
numberInherited fromMapObjectSpecifies longitude to which map should be moved when this object is clicked.
zoomXType
numberInherited fromMapObjectSpecifies X position (in percents of stage width) to which map should be moved when this object is clicked. You can also use zoomLat and zoomLong instead of zoomX and zoomY.
zoomYType
numberInherited fromMapObjectSpecifies Y position (in percents of stage height) to which map should be moved when this object is clicked. You can also use zoomLat and zoomLong instead of zoomX and zoomY.
Methods
validate()Returns
voidRedraws the area.
Events
MapArea does not have any events.