Maps API for JavaScript Developer's Guide

H.util.wkt

Namespace Summary

This namespace contains functionality to process geometries in Well Known Text (WKT) format.

Method Summary

Table 1. Methods
Methods

static toGeometry (wkt) : {H.geo.AbstractGeometry}

To create a geometry according to the given Well Known Text (WKT) . It supports the following geometry types:

Namespace Description

This namespace contains functionality to process geometries in Well Known Text (WKT) format.

Method Details

static toGeometry (wkt) : {H.geo.AbstractGeometry}

To create a geometry according to the given Well Known Text (WKT) . It supports the following geometry types:

  • POINT (A value of EMPTY is not supported and results into null)
  • LINESTRING
  • POLYGON
  • MULTIPOINT
  • MULTILINESTRING
  • MULTIPOLYGON

The designator Z and M are supported but only the latitude values (Z) are taken into account, whereas the measure values (M) are discarded.

Example

var geoPoint = H.util.wkt.toGeometry('POINT (13.3827 52.5309)');
map.addObject(new H.map.Marker(geoPoint));
Parameters:
 
wkt:
{string}
 
Returns:
 
{H.geo.AbstractGeometry}
The resulting geometry
Throws:
 
{H.lang.InvalidArgumentError}
 
in case of malformed WKT.

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.