Maps API for JavaScript Developer's Guide

H.service.extension.customLocation.Table

Class Summary

Implements: H.service.extension.dataView.ITable

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

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

getRows () : {!Array<!H.service.extension.customLocation.Table.Row>}

Returns a collection of all existing rows of the table.

addCells (cells) : {number}

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

addRow () : {H.service.extension.customLocation.Table.Row}

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

setCell (rowIndex, columnName, value)

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

getMeta () : {M}

To get meta information of the table.

getRowCount () : {!number}

To get the number of rows

getRow (rowIndex) : {(!H.service.extension.dataView.IRow<C> | undefined)}

To get the row at the given index.

getColumnNames () : {!Array<string>}

To get a ordered list of all column names.

getColumn (columnName) : {(!H.service.extension.dataView.IColumn<C> | undefined)}

To get the column with the given name.

getCell (rowIndex, columnName) : {(C | undefined)}

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

concat (var_args) : {!H.service.extension.dataView.ITable<C, M>}

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.

Class Description

This class represents a CLE 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.

Constructor Details

H.service.extension.customLocation.Table()

Throws:
 
{H.lang.IllegalOperationError}
 
If directly called via new operator.

Method Details

getRows () : {!Array<!H.service.extension.customLocation.Table.Row>}

Returns a collection of all existing rows of the table.

addCells (cells) : {number}

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

Example

rowIndex = table.addCells([
  row1Col1Value, row1Col2Value, '', row1Geometry,
  row2Col1Value, row2Col2Value, '', row2Geometry
]);
firstAppendedRow = table.getRow(rowIndex);
Parameters:
 
cells:
{!Array<(?string | H.geo.AbstractGeometry)>}
 
The cell values of the row(s) in the order of the table's column names.
Returns:
 
{number}
the index of the appended row. If multiple rows were appended, then the index of the first one.
Throws:
 
{H.lang.InvalidArgumentError}
 
if the number of passed cells is not a multiple of the number of the table's columns.

addRow () : {H.service.extension.customLocation.Table.Row}

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

Returns:
 
{H.service.extension.customLocation.Table.Row}
the added row.

setCell (rowIndex, columnName, value)

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.

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));
Parameters:
 
rowIndex:
{number}
 
The zero-based index of the cell's row.
columnName:
{string}
 
The name of the cell's column.
value:
{*}
 
The cell's value to set
Throws:
 
{H.lang.InvalidArgumentError}
 
if a row with the given index or a column with the given name doesn't exist.

getMeta () : {M}

To get meta information of the table.

Returns:
 
{M}

getRowCount () : {!number}

To get the number of rows

Returns:
 
{!number}

getRow (rowIndex) : {(!H.service.extension.dataView.IRow<C> | undefined)}

To get the row at the given index.

Parameters:
 
rowIndex:
{number}
 
The zero-based index of the row.
Returns:
 
{(!H.service.extension.dataView.IRow<C> | undefined)}
The specified row or undefined if the given row index is out of range.

getColumnNames () : {!Array<string>}

To get a ordered list of all column names.

Returns:
 
{!Array<string>}
the list of the column names.

getColumn (columnName) : {(!H.service.extension.dataView.IColumn<C> | undefined)}

To get the column with the given name.

Parameters:
 
columnName:
{string}
 
The name of the column.
Returns:
 
{(!H.service.extension.dataView.IColumn<C> | undefined)}
The specified column or undefined if no column with the given name exists.

getCell (rowIndex, columnName) : {(C | undefined)}

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

Parameters:
 
rowIndex:
{number}
 
The zero-based index of the cell's row.
columnName:
{string}
 
The name of the cell's column.
Returns:
 
{(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.

concat (var_args) : {!H.service.extension.dataView.ITable<C, M>}

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.

Parameters:
 
var_args:
{...!H.service.extension.dataView.ITable<C, M>}
 
Tables to concatenate into a new table.
Returns:
 
{!H.service.extension.dataView.ITable<C, M>}
the resulting table.
Throws:
 
{H.lang.InvalidArgumentError}
 
if the tables have a different columns.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.