Could some one please tell me why this works. (prebundled vs importing)
i have another example but then it is the other way around (when using OffsetCurveBuilder the prebundled doesnt work and the importing does)
Added to the index.html:
const parser = new jsts.io.OL3Parser();
parser.inject(
Point,
LineString,
LinearRing,
Polygon,
MultiPoint,
MultiLineString,
MultiPolygon,
GeometryCollection
);
const jstsGeom = parser.read(lineString);
// Create a LengthIndexedLine from the LineString
const lengthIndexedLine = new jsts.linearref.LengthIndexedLine(jstsGeom);
And this doesnt resulting in the following error
Uncaught IllegalArgumentException: Lineal geometry is required
at _LinearIterator.constructor_ (
Added to package.json
"jsts": "^2.11.3"
import {LengthIndexedLine} from 'jsts/org/locationtech/jts/linearref';
const parser = new jsts.io.OL3Parser();
parser.inject(
Point,
LineString,
LinearRing,
Polygon,
MultiPoint,
MultiLineString,
MultiPolygon,
GeometryCollection
);
const jstsGeom = parser.read(lineString);
// Create a LengthIndexedLine from the LineString
const lengthIndexedLine = new LengthIndexedLine(jstsGeom);
Hi,
Could some one please tell me why this works. (prebundled vs importing)
i have another example but then it is the other way around (when using OffsetCurveBuilder the prebundled doesnt work and the importing does)
Added to the index.html:
And this doesnt resulting in the following error
Added to package.json "jsts": "^2.11.3"