I want to convert a wkt string received from a textarea in a function called onpaste. But I always got this error :
Invalid WKT string provided to read()
and this is my simple code and I know that my wkt is correct because I have tested it in another place :
var wkt_geom = document.getElementById("inwkt").value;
wkt = new Wkt.Wkt();
wkt.read(wkt_geom);
and this is my wkt :
LINESTRING (30 10, 10 30, 40 40)