This namespace contains functionality to process geometries in Well Known Text (WKT) format.
Methods
-
H.util.wkt.toGeometry (wkt)H.geo.AbstractGeometry static
-
To create a geometry according to the given Well Known Text (WKT) . It supports the following geometry types:
- POINT (A value of
EMPTYis not supported and results intonull) - 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.
Name Type Description wktstring Throws:
-
in case of malformed WKT.
Returns:
Type Description H.geo.AbstractGeometry The resulting geometry Example
var geoPoint = H.util.wkt.toGeometry('POINT (13.3827 52.5309)'); map.addObject(new H.map.Marker(geoPoint)); - POINT (A value of