Class: Navlink

.xyz.maps.editor.features. Navlink

Parameters:
Name Type Argument Description
id String | Number <optional>
of the navlink
coordinates Array.<here.xyz.maps.editor.GeoCoordinate> | Array.<here.xyz.maps.editor.PixelCoordinate> Coordinates of the navlink.
properties here.xyz.maps.editor.features.Feature.Properties <optional>
Properties of the navlink.

Extends

Classes

Shape

Members Summary

bbox :Array.<number>

Bounding box of the feature.
The value of the bbox member is an array of length 4, with all axes of the most southwesterly point followed by all axes of the more northeasterly point.
The "bbox" values define shapes with edges that follow lines of constant longitude and latitude.

class :string

Feature class of this feature, the value is "NAVLINK".

geometry :object

A geometry is a object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon" or "MultiPolygon".
A geometry object must have a member with the name "coordinates".
The value of the coordinates member is always an array (referred to as the coordinates array below).
The structure for the elements in this array are determined by the type of geometry.

For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension.
There must be at least two elements, and may be more.
The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system).

For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".

For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point".
The coordinates array for a LineString must have two or more elements.
A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points).
Though a LinearRing is not explicitly represented as a geometry type, it is referred to in the Polygon geometry type definition.

For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".

For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString".
Furthermore, each LineString in the coordinates array must be a LinearRing.
For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.

For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".

id :number

id of the feature.

properties :here.xyz.maps.editor.features.Feature.Properties

properties of this feature.

Methods Summary

addShape(p, index) → {boolean|number}

Add a new shape point to the link.

checkCrossings(option) → {Array.<here.xyz.maps.editor.features.Crossing>}

Checks for possible crossings with other links.

coord() → {Array.<Array>|Array.<number>}

Get coordinate(s) of the feature.

editable(editable)

Set the object editable or read only.

editTurnRestrictions(shapeIndex) → {Array.<here.xyz.maps.editor.features.TurnRestriction>}

Show turn restrictions of shape points on selected link.
Get connected links of node.

getZLevels(shapeIndex) → {Array.<number>|number}

Get the z-levels of the coordinates of this object.

prop() → {here.xyz.maps.editor.features.Feature.Properties}

Get deep copy of all properties of the feature

remove()

Remove the object.

select()

Highlight and selects this object.

setGeoFence(radius)

Sets geofence radius, it takes an integer as parameter.

setZLevels(levels)

Set the z-levels of the coordinates of this object. For each coordinate the levels array must contain one
integer between -4 and +5.

showDirectionHint(dir, hideShapes)

Show or hide the direction hint on this navlink.
If no direction argument is passed the hint will be hidden.

style(style) → {Array.<here.xyz.maps.layers.TileLayer.Style>}

Get default or current style of the feature.

transform()

Helper function to transform the object (move/scale/rotate)

unselect()

Unselect the object, unhightlight it.

Members Details

bbox :Array.<number> [Optional]

Bounding box of the feature.
The value of the bbox member is an array of length 4, with all axes of the most southwesterly point followed by all axes of the more northeasterly point.
The "bbox" values define shapes with edges that follow lines of constant longitude and latitude.
Type:
Array.<number>
Inherited From:

class :string

Feature class of this feature, the value is "NAVLINK".
Type:
string

geometry :object

A geometry is a object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon" or "MultiPolygon".
A geometry object must have a member with the name "coordinates".
The value of the coordinates member is always an array (referred to as the coordinates array below).
The structure for the elements in this array are determined by the type of geometry.

For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension.
There must be at least two elements, and may be more.
The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system).

For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".

For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point".
The coordinates array for a LineString must have two or more elements.
A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points).
Though a LinearRing is not explicitly represented as a geometry type, it is referred to in the Polygon geometry type definition.

For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".

For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString".
Furthermore, each LineString in the coordinates array must be a LinearRing.
For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.

For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".
Type:
object
Inherited From:
Example:
Point:
{
   "type": "Point",
   "coordinates": [100.0, 0.0]
}

Polygon:
{
    "type": "Polygon",
    "coordinates": [
        [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    ]
}

id :number

id of the feature.
Type:
number
Inherited From:

properties :here.xyz.maps.editor.features.Feature.Properties

properties of this feature.
Type:
here.xyz.maps.editor.features.Feature.Properties
Inherited From:

Methods Details

addShape(p, index) → {boolean|number}

Add a new shape point to the link.
Parameters:
Name Type Argument Description
p here.xyz.maps.editor.PixelCoordinate the object containing a coordinate.
index Number <optional>
the position where new shape point should be inserted.
Returns:
isAdded index of shape or false if could not be added
Type:
boolean | number

checkCrossings(option) → {Array.<here.xyz.maps.editor.features.Crossing>}

Checks for possible crossings with other links.
Parameters:
Name Type Argument Description
option Object <optional>
Properties
Name Type Argument Description
class String <optional>
Class of crossing (CROSSING|CROSSING_CANDIDATE) to check for
styles Object <optional>
display style of crossings. 6 configurable styling objects('connector1', 'connector2', 'connector3', 'search1', 'search2', 'found') comprise a crossing
Returns:
array of found crossings
Type:
Array.<here.xyz.maps.editor.features.Crossing>
Example:
crossing.checkCrossings({
         type: "CROSSING",
         styles: {
             'connector1': {fill: 'black'},
             'connector2': {stroke: '#FBF'}
         }
     })

coord() → {Array.<Array>|Array.<number>}

Get coordinate(s) of the feature.
Inherited From:
Returns:
coordinates of the feature, it is either array of coordinates: [longitude, latitude, z] or array of coordinate arrays: [ [longitude, latitude, z], [longitude, latitude, z], , , , ] depending on the type of feature.
Type:
Array.<Array> | Array.<number>

editable(editable)

Set the object editable or read only.
Parameters:
Name Type Description
editable Boolean True, the object is editable. false, the object is read only.
Inherited From:
Example:
object.editable(false); // set the object read only

 

editTurnRestrictions(shapeIndex) → {Array.<here.xyz.maps.editor.features.TurnRestriction>}

Show turn restrictions of shape points on selected link.
Parameters:
Name Type Argument Description
shapeIndex number <optional>
shapeindex of node to display turn restrictions. if no index is defined turn restrictions for start and end node will be displayed.
Returns:
Array of turn restrictions for start and end shape points (nodes) respectively.
Type:
Array.<here.xyz.maps.editor.features.TurnRestriction>
Get connected links of node.
Parameters:
Name Type Argument Description
index number coordinate index of shape/node
details boolean <optional>
flag to enable detailed connected link information.
Returns:
Array of connected navlink features or Array of detailed connected link information including the shape/node index of connected link.
Type:
Array.<here.xyz.maps.editor.features.Navlink> | Array.<{link: here.xyz.maps.editor.features.Navlink, index: number}>

getZLevels(shapeIndex) → {Array.<number>|number}

Get the z-levels of the coordinates of this object.
Parameters:
Name Type Argument Description
shapeIndex number <optional>
shapeindex for specific shape only
Returns:
The Array of z-levels for the coordinates of this object or specific z-level if shape index is passed.
Type:
Array.<number> | number

prop() → {here.xyz.maps.editor.features.Feature.Properties}

Get deep copy of all properties of the feature
Inherited From:
Returns:
return properties of the object
Type:
here.xyz.maps.editor.features.Feature.Properties

remove()

Remove the object.
Inherited From:

select()

Highlight and selects this object.
Inherited From:

setGeoFence(radius)

Sets geofence radius, it takes an integer as parameter.
Parameters:
Name Type Description
radius number The geofence radius.

setZLevels(levels)

Set the z-levels of the coordinates of this object. For each coordinate the levels array must contain one
integer between -4 and +5.
Parameters:
Name Type Description
levels Array.<number> The z-levels to be set for the coordinates of this object.
Example:
var zlevels = navlink.getZLevels();
 zlevels[1] = -4;
 navlink.setZLevels(zlevels);

 

showDirectionHint(dir, hideShapes)

Show or hide the direction hint on this navlink.
If no direction argument is passed the hint will be hidden.
Parameters:
Name Type Argument Description
dir String <optional>
direction of the link, possible value: "BOTH"|"START_TO_END"|"END_TO_START"
hideShapes Boolean <optional>
indicates if the shapes are hidden

style(style) → {Array.<here.xyz.maps.layers.TileLayer.Style>}

Get default or current style of the feature.
Parameters:
Name Type Argument Default Description
style string <optional>
"default" a string indicating which style to return, either "default" or "current".
Inherited From:
Deprecated:
  • Yes
Returns:
styles style of this feature
Type:
Array.<here.xyz.maps.layers.TileLayer.Style>

transform()

Helper function to transform the object (move/scale/rotate)
Inherited From:

unselect()

Unselect the object, unhightlight it.
Inherited From: