-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I cant figure out how to use the offset.
my path (these are lat and lng multiplied by a factor (var = much) so there are no floats):
0: {X: -64495704356878990, Y: 17728257235288618}
1: {X: 33825643130689868, Y: 35791054832488292}
2: {X: 33350694551616910, Y: 38243895152211190}
3: {X: 51060644978135840, Y: 41477372029423710}
4: {X: 64495704356878990, Y: -32111469474285844}
5: {X: 46514280537813896, Y: -34006947936415670}
6: {X: 46310761470943704, Y: -31999953263103964}
7: {X: -53503146229237310, Y: -41477372029423710}
8: {X: -53978103757947680, Y: -39024406116455790}
then i do this:
var subject = new Shape(path, true, false)
var offset = subject.offset((30 * much), {
jointType: 'jtSquare',
endType: 'etClosedPolygon',
miterLimit: 2.0,
roundPrecision: 0.25
})
console.log(subject)
log gives me:
Shape {paths: Array(9), closed: true} // coordinates match the path coordinates
console.log(offset)
log gives me:
Shape {paths: Array(0), closed: true}