Use the ES6 export for martinez-polygon-clipping

This commit is contained in:
Bryan Housel
2020-02-03 11:43:33 -05:00
parent b4bc5305a1
commit b2b2689fb2
4 changed files with 5 additions and 14 deletions
+1 -4
View File
@@ -22,10 +22,7 @@ export default {
plugins: [
progress(),
includePaths({
paths: ['node_modules/d3/node_modules'], // npm2 or windows
include: {
'martinez-polygon-clipping': 'node_modules/martinez-polygon-clipping/dist/martinez.umd.js'
}
paths: ['node_modules/d3/node_modules'] // npm2 or windows
}),
nodeResolve({ dedupe: ['object-inspect'] }),
commonjs(),
+1 -4
View File
@@ -23,10 +23,7 @@ export default {
plugins: [
progress(),
includePaths({
paths: ['node_modules/d3/node_modules'], // npm2 or windows
include: {
'martinez-polygon-clipping': 'node_modules/martinez-polygon-clipping/dist/martinez.umd.js'
}
paths: ['node_modules/d3/node_modules'] // npm2 or windows
}),
nodeResolve({ dedupe: ['object-inspect'] }),
commonjs(),
+1 -4
View File
@@ -22,10 +22,7 @@ export default {
plugins: [
progress(),
includePaths({
paths: ['node_modules/d3/node_modules'], // npm2 or windows
include: {
'martinez-polygon-clipping': 'node_modules/martinez-polygon-clipping/dist/martinez.umd.js'
}
paths: ['node_modules/d3/node_modules'] // npm2 or windows
}),
nodeResolve({ dedupe: ['object-inspect'] }),
commonjs(),
+2 -2
View File
@@ -65,8 +65,8 @@ function vtToGeoJSON(data, tile, mergeCache) {
var merged = mergeCache[propertyhash];
if (merged && merged.length) {
var other = merged[0];
var coords = martinez.union(
feature.geometry.coordinates, other.geometry.coordinates
var coords = martinez(
feature.geometry.coordinates, other.geometry.coordinates, 1 /*UNION*/
);
if (!coords || !coords.length) {