Class: TextPath

IDEE/impl/util/TextPath~TextPath


import TextPath from 'IDEE/impl/util/TextPath';

Implementación de la clase TextPath.

new TextPath()

impl/ol/js/util/Textpath.js, line 12

Members

module:IDEE/impl/util/TextPath~TextPath.DEFAULT{object}

Valores de estilos predeterminados.

Methods

module:IDEE/impl/util/TextPath~TextPath.draw(ctx, coord2Pixel, textStyle, coords)

impl/ol/js/util/Textpath.js, line 202

Dibuja el estilo del texto de la trayectoria si la capa u objeto geográfico lo ha configurado.

Name Type Description
ctx Object

Contexto.

coord2Pixel Array.<number>

Array de coordenadas en píxeles.

textStyle Object

Estilo del texto.

coords Array.<Array.<number>>

Coordenadas.

module:IDEE/impl/util/TextPath~TextPath.formatStyle(style){function}

impl/ol/js/util/Textpath.js, line 168

Este método añade un estilo de Openlayers en una función de estilo.

Name Type Description
style object

Estilo de Openlayers.

Returns:
Función de estilo.

module:IDEE/impl/util/TextPath~TextPath.getPath_(c2p, coords, readable){Array.<number>}

impl/ol/js/util/Textpath.js, line 141

Obtiene la trayectoria a partir de las coordenadas especificadas

  • ⚠️ Advertencia: Este método no debe ser llamado por el usuario.
Name Type Description
c2p Array.<number>

Array de coordenadas en píxeles

coords Array.<Array.<number>>

Coordenadas

readable boolean

Indica si se invierte la trayectoria

Returns:
Trayectoria

module:IDEE/impl/util/TextPath~TextPath.render(text, path)

impl/ol/js/util/Textpath.js, line 23

Método de representación. Dibuja texto a lo largo de la trayectoria

Name Type Description
text string

Texto a representar

path Array.<Number>

Trayectoria

See: