Powered by Zoomin Software. For more details please contactZoomin

HERE Maps API for JavaScript - API Reference

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Maps API for JavaScript - API Reference: Class: Table

Table of Contents

Class: Table

new H.service.extension.customLocation.Table () Deprecated : since 3.1.63.0

This class represents a data layer as a table. It implements the H.service.extension.dataView.ITable .<*, H.service.extension.customLocation.MetaInfo> interface.

Instances of this class must not be created directly via new operator. Instead a new instance can be created via H.service.extension.customLocation.Service#createLayer method.

Throws:

If directly called via new operator.

Type
H.lang.IllegalOperationError

Implements

Classes

Column
Row

Methods

addCells (cells)number Deprecated : since 3.1.63.0

To add cells at the bottom of the table. Use this method to create rows for already existing bulk data.

Name Type Description
cells Array.<(string|!H.geo.AbstractGeometry)>

The cell values of the row(s) in the order of the table's column names.

Throws:

if the number of passed cells is not a multiple of the number of the table's columns.

Type
H.lang.InvalidArgumentError
Returns:
Type Description
number the index of the appended row. If multiple rows were appended, then the index of the first one.
Example
rowIndex = table.addCells([
  row1Col1Value, row1Col2Value, '', row1Geometry,
  row2Col1Value, row2Col2Value, '', row2Geometry
]);
firstAppendedRow = table.getRow(rowIndex);

addRow ()H.service.extension.customLocation.Table.Row Deprecated : since 3.1.63.0

To add a new row at the bottom of the table. All cells of the row are initialized with a null value.

Returns:
Type Description
H.service.extension.customLocation.Table.Row the added row.

concat (var_args)H.service.extension.dataView.ITable.<C, M> Deprecated : since 3.1.63.0

To merge two ore more tables. It doesn't change the existing table, but instead returns a new one. The concat method creates a new ITable consisting of the rows in the object on which it is called, followed in order by, for each argument, the rows of that argument. in the arguments list.

Name Type Description
var_args H.service.extension.dataView.ITable.<C, M> repeatable

Tables to concatenate into a new table.

Throws:

if the tables have a different columns.

Type
H.lang.InvalidArgumentError
Returns:
Type Description
H.service.extension.dataView.ITable.<C, M> the resulting table.

getCell (rowIndex, columnName)C | undefined Deprecated : since 3.1.63.0

To get the cell value at the given row index and named column

Name Type Description
rowIndex number

The zero-based index of the cell's row.

columnName string

The name of the cell's column.

Returns:
Type Description
C | undefined The value of the specified cell or undefined if the given row index is out of range or a column of the given name doesn't exists.

getColumn (columnName)!H.service.extension.dataView.IColumn.<C> | undefined Deprecated : since 3.1.63.0

To get the column with the given name.

Name Type Description
columnName string

The name of the column.

Returns:
Type Description
!H.service.extension.dataView.IColumn.<C> | undefined The specified column or undefined if no column with the given name exists.

getColumnNames ()Array.<string> Deprecated : since 3.1.63.0

To get a ordered list of all column names.

Returns:
Type Description
Array.<string> the list of the column names.

getMeta ()M Deprecated : since 3.1.63.0

To get meta information of the table.

Returns:
Type Description
M

getRow (rowIndex)!H.service.extension.dataView.IRow.<C> | undefined Deprecated : since 3.1.63.0

To get the row at the given index.

Name Type Description
rowIndex number

The zero-based index of the row.

Returns:
Type Description
!H.service.extension.dataView.IRow.<C> | undefined The specified row or undefined if the given row index is out of range.

getRowCount ()number Deprecated : since 3.1.63.0

To get the number of rows

Returns:
Type Description
number

getRows ()Array.<!H.service.extension.customLocation.Table.Row> Deprecated : since 3.1.63.0

Returns a collection of all existing rows of the table.

Returns:

setCell (rowIndex, columnName, value) Deprecated : since 3.1.63.0

To set the value of the cell at the specified row and column.

GEOMETRY_ID cell of an existing row should not be modified to not cause data inconsistency.

Throws:

if a row with the given index or a column with the given name doesn't exist.

Type
H.lang.InvalidArgumentError
Example
// Set value of the column with the specified name for the first row
table.setCell(0, "COMPANY", "HERE Technologies");
table.setCell(0, "WKT", new H.geo.Point(52.5309, 13.3849));
Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert