You are browsing a class reference for deprecated Version 2 of the JavaScript Charts.
Documentation for other versions: amCharts 4 (current) or amCharts 3.
Inheritance: MapLine → MapObject
MapLine is a class where lines are defined. If you want the line to be placed on a stage and not moved together with the map, you should set xArray and yArray properties. Otherwise set latArray and longArray properties. In case some property is not defined in this class, MapLine will use LinesSettings class property with the same name.
Property | Type | Default | Description |
---|---|---|---|
alpha | Number | Opacity of map object. | |
arrow | String | Arrow position. Allowed values are: start, end, middle, both, none. | |
arrowAlpha | Number | Opacity of an arrow. | |
arrowColor | String | Color of an arrow. | |
arrowSize | Number | Size of an arrow. | |
balloonText | String | Text which is displayed in a roll-over balloon. You can use the following tags: [[title]], [[description]], [[value]] and [[percent]]. | |
balloonText | String | Text which is displayed in a roll-over balloon. You can use the following tags: [[title]], [[description]], [[value]] and [[percent]]. | |
color | String | Color of MapObject | |
color | String | Color of MapObject | |
customData | Object | A custom data holder. | |
dashLength | Number | Dash length. | |
description | String | Description 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. | |
descriptionWindowHeight | Number | Height of description window. | |
descriptionWindowWidth | Number | Width of description window. | |
descriptionWindowX | Number | X position of description window. In case it is not set, window will be placed near the mouse pointer. | |
descriptionWindowY | Number | X position of description window. In case it is not set, window will be placed near the mouse pointer. | |
fixedSize | Boolean | true | Specifies 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. |
groupId | String | Id 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. | |
id | String | Unique id of the object. In case it's area, id should match svg path id from SVG file. Id can be used with linkToObject property of MapObject - you can link one object to another using it. | |
images | Array | Array of MapImage objects. | |
latitudes | Array | Array of latitudes. If you set array of latitudes and longitudes, line move with the map. In case you want the line to be in a fixed position, set x and y arrays instead. | |
lines | Array | Array of MapLine objects. | |
linkToObject | MapObject | linkToObject 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. | |
longitudes | Array | Array of longitudes. If you set array of latitudes and longitudes, line move with the map. In case you want the line to be in a fixed position, set x and y arrays instead. | |
mouseEnabled | Boolean | true | Set this to false to make the object be irresponsive to any interactions like hover or click events. |
objectType | String | Read-only, type of the Object. Possible values are: "DataSet", "MapImage", "MapLine" and "MapArea". | |
passZoomValuesToTarget | Boolean | false | Specifies if current zoom values should be passed to target MapObject. Useful when building drill down maps. |
remainVisible | Boolean | true | Specifies if the MapObject and other objects of the same level should remain visible if it was clicked and it has children MapObjects. |
rollOverColor | String | Roll over color of of the object. | |
selectable | Boolean | false | Specifies 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. |
selectedColor | String | Color of an object when it is selected (somebody clicked on it). | |
showAsSelected | Boolean | false | Specifies 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, movies, lines) have to look like they are selected. By setting this property to true, you will be able to produce this result. |
showInList | Boolean | Specifies if this object must be displayed in ObjectsList Title should be defined in order the object to appear there. | |
thickness | Number | Line thickness. | |
title | String | Title 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. | |
url | String | Url of an object. The application will go to this url when you click on the object. | |
urlTarget | String | _self | Target of an URL, if URL is a string, for example: "_blank", "_top". |
useTargetsZoomValues | Boolean | false | Specifies if MapObject's, specified in the url zoom values should be used. Useful when building drill down maps. |
x | Array | Array of x coordinates. If you set array of x and y coordinates, line will not move with the map. In case you want the line to be bounded to the map, set latitudes and longitudes instead. | |
y | Array | Array of y coordinates. If you set array of x and y coordinates, line will not move with the map. In case you want the line to be bounded to the map, set latitudes and longitudes instead. | |
zoomLatitude | Number | Specifies latitude to which map should be moved when this object is clicked | |
zoomLevel | Number | Specifies map scale to which map should be rescaled when this object is clicked. | |
zoomLongitude | Number | Specifies longitude to which map should be moved when this object is clicked. | |
zoomX | Number | Specifies 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 zoomY and zoomY. | |
zoomY | Number | Specifies 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 zoomY and zoomY. |