MapFiguredArrow Constructor

Syntax

PP.MapFiguredArrow (settings);

Parameters

settings. The JSON object with the values of the component properties.

Description

The MapFiguredArrow constructor creates an instance of the MapFiguredArrow class.

Example

To execute the example the HTML page must contain the MapChart component (see Map Layout on HTML Page) named map, XML file that contains map settings, and the Russia.svg topobase.

Create the addFiguredArrow() function executing which adds a shaped arrow on the map. The function is added after the string: map.addToNode(document.getElementById("map-content")).

function addFiguredArrow()

{

  var figuredArrowSettings = {

   //full arrow setup in JSON format

  }

//select the map

  figuredArrowSettings.Chart = map;

//set item dictionary

  figuredArrowSettings.Dictionary = map.getItemsDictionary();

//create a shaped arrow

  var figuredArrow = new PP.MapFiguredArrow(figuredArrowSettings);

//place the arrow on the map

  figuredArrow.draw(document.getElementById("ar1"));

}

//the function is executed on loading the map

map.Loaded.add(addFiguredArrow);

After executing the example, a shaped arrow is placed on the map. Arrow appearance depends on the JSON settings.

See also:

MapFiguredArrow