MapLine

Type class

Extension for MapObject to define individual settings for each line. it overwrites the settings obtained from LinesSettings.

Example

var map = AmCharts.makeChart("mapdiv",{
  ...
  "dataProvider": [
    map: "worldHigh",
    "lines": [
      {
        "latitudes": [51.5002, 50.4422],
        "longitudes": [-0.1262, 30.5367]
      }
    ]
  }
});

Inheritance

MapLine extends MapObject.

MapLine is not extended by any other symbol.

Properties

arc
#

Type number

Using this setting you can make lines to be curved, or actually to make them look like arcs. Note, there is one limitation - this works well with two-point lines only.

arrow
#

Type string

Arrow position. Allowed values are: start, end, middle, both, none.

arrowAlpha
#

Type number

Opacity of an arrow.

arrowColor
#

Type color

Color of an arrow.

arrowSize
#

Type number

Size of an arrow.

dashLength
#

Type number

Dash length.

latitudes
#

Type number[]

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.

longitudes
#

Type number[]

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.

thickness
#

Type number

Line thickness.

x
#

Type number[]

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
#

Type number[]

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.

accessibleLabel
#

Type string

Inherited from MapObject

Text 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.

alpha
#

Type number

Inherited from MapObject

Opacity of map object.

balloonText
#

Type string

Inherited from MapObject

Text which is displayed in a roll-over balloon. You can use the following tags: [[title]], [[description]], [[value]] and [[percent]].

To disable the balloons, set it to an empty string.

bringForwardOnHover
#

Type boolean

Inherited from MapObject

Specifies if the object should change it's z-index to the top-most when user hovers it.

color
#

Type color

Inherited from MapObject

Color of MapObject

customData
#

Type object

Inherited from MapObject

A custom data holder.

description
#

Type string

Inherited from MapObject

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.

descriptionWindowBottom
#

Inherited from MapObject

Distance 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.

descriptionWindowHeight
#

Type number

Inherited from MapObject

Height of description window.

descriptionWindowLeft
#

Type number

Inherited from MapObject

Distance 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.

descriptionWindowRight
#

Inherited from MapObject

Distance 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.

descriptionWindowTop
#

Type number

Inherited from MapObject

Distance 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.

descriptionWindowWidth
#

Type number

Inherited from MapObject

Width of description window.

fixedSize
#

Type boolean

Default true

Inherited from MapObject

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
#

Type string

Inherited from MapObject

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
#

Type string

Inherited from MapObject

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
#

Type MapImage[]

Inherited from MapObject

Array of MapImage objects.

lines
#

Type MapLine[]

Inherited from MapObject

Array of MapLine objects.

linkToObject
#

Type MapObject

Inherited from 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.

mouseEnabled
#

Type boolean

Default true

Inherited from MapObject

Set this to false to make the object be irresponsive to any interactions like hover or click events.

passZoomValuesToTarget
#

Type boolean

Default false

Inherited from MapObject

Specifies if current zoom values should be passed to target MapObject. Useful when building drill down maps.

remainVisible
#

Type boolean

Default true

Inherited from MapObject

Specifies if the MapObject and other objects of the same level should remain visible if it was clicked and it has children MapObjects.

rollOverColor
#

Type color

Inherited from MapObject

Roll over color of of the object.

selectable
#

Type boolean

Default false

Inherited from MapObject

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
#

Type color

Inherited from MapObject

Color of an object when it is selected (somebody clicked on it).

showAsSelected
#

Type boolean

Default false

Inherited from MapObject

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, images, lines) have to look like they are selected. By setting this property to true, you will be able to produce this result.

showInList
#

Type boolean

Inherited from MapObject

Specifies if this object must be displayed in ObjectsList Title should be defined in order the object to appear there.

tabIndex
#

Type number

Inherited from MapObject

In 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.

title
#

Type string

Inherited from MapObject

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
#

Type string

Inherited from MapObject

Url of an object. The application will go to this url when you click on the object.

urlTarget
#

Type string

Default _self

Inherited from MapObject

Target of an URL, if URL is a string, for example: "_blank", "_top".

useTargetsZoomValues
#

Type boolean

Default false

Inherited from MapObject

If set to true the map will carry over the same zoom values when transitioning to new data provider. Useful when building drill down maps.

zoomLatitude
#

Type number

Inherited from MapObject

Specifies latitude to which map should be moved when this object is clicked

zoomLevel
#

Type number

Inherited from MapObject

Specifies map scale to which map should be rescaled when this object is clicked.

zoomLongitude
#

Type number

Inherited from MapObject

Specifies longitude to which map should be moved when this object is clicked.

zoomX
#

Type number

Inherited from MapObject

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 zoomX and zoomY.

zoomY
#

Type number

Inherited from MapObject

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 zoomX and zoomY.

There are 37 inherited items currently hidden from this list.

Methods

deleteObject()

#

Returns void

Deletes the line.

fixToMap()

#

Returns void

Fixes the line to the map instead of the stage. To do this, x and y coordinates are changed to longitudes and latitudes.

fixToStage()

#

Returns void

Fixes the line to the stage instead of the map. To do this, longitudes and latitudes are changed to x and y coordinates.

validate()

#

Returns void

Redraws the line.

Events

MapLine does not have any events.

Adapters

MapLine does not have any adapters.