MapChart.PixelsPerRadian

Syntax

PixelsPerRadian: Object;

Description

The PixelsPerRadian property specifies number of radians per one map pixel horizontally and vertically.

Comments

Property value can be set from JSON or using the setPixelsPerRadian property.

The property contains a JSON object with the fields x and y - respectively number of radians per pixel horizontally and vertically.

Example

To execute the example the HTML page must contain the MapChart component named map and the component named MapType (see  ). A map with the Sphere display type must also be loaded (see page of the property description MapChart.AmbientLightValueToolBar component named MapType (see  Example of Creating the MapChart Component). A map with the Sphere display type must also be loaded (see the page with description of the MapChart.AmbientLightValue property).

Determine number of radians corresponding per pixel of the map horizontally and vertically:

// Determine number of radians corresponding per pixel
var pixelsPerRadian = map.getPixelsPerRadian();
console.log("Number of radians per pixel horizontally: " + pixelsPerRadian.x);
console.log("Number of radians per pixel vertically: " + pixelsPerRadian.y);

As a result of executing the example, the browser console displays the number of radians corresponding to one pixel of the map horizontally and vertically:

Number of radians per pixel, horizontally: 0.0063617626240385

Number of radians per pixel, vertically: 0.0038008917619369

See also:

MapChart