How to use the martinez-polygon-clipping.xor function in martinez-polygon-clipping

To help you get started, we’ve selected a few martinez-polygon-clipping examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mfogel / polygon-clipping / docs / src / App.vue View on Github external
setOperation(e) {
      this.selectedOperation = e.target.value;
      outLayer.clearLayers();

      if (this.selectedOperation === "Union") {
        operation = pc.union;
        martinezOp = martinez.union;
      }
      if (this.selectedOperation === "Intersection") {
        operation = pc.intersection;
        martinezOp = martinez.intersection;
      }
      if (this.selectedOperation === "XOR") {
        operation = pc.xor;
        martinezOp = martinez.xor;
      }
      if (this.selectedOperation === "Difference") {
        operation = pc.difference;
        martinezOp = martinez.diff;
      }

      this.runOperation();
    },
    runOperation() {

martinez-polygon-clipping

Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis