MapSimpleArrow Constructor

Syntax

PP.MapSimpleArrow (settings)

Parameters

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

Description

The MapSimpleArrow constructor creates an instance of the MapSimpleArrow 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 function addSimpleArrow(), executing which adds a simple arrow on the map. The function is added after the string: map.addToNode(document.getElementById("map-content")).

  function addSimpleArrow()

  {

  var simpleArrowSettings = {

//Setting up an arrow in JSON format

  }

//select the map

  simpleArrowSettings.Chart = map;

//set item dictionary

  simpleArrowSettings.Dictionary = map.getItemsDictionary();

//create a simple arrow

  var simpleArrow = new PP.MapSimpleArrow(simpleArrowSettings);

//add the arrow to the page

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

  }

//the function is executed on loading the map

  map.Loaded.add(addSimpleArrow);

After executing the example a simple arrow is added to the map, arrow view depends on the JSON settings.

See also:

MapSimpleArrow