From bf42bce3be3ce6156a5be60275115e601f8206ef Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 26 Feb 2020 15:18:16 -0800 Subject: [PATCH] Update martinez-polygon-clipping to v0.6.2 (close #7370) --- modules/services/vector_tile.js | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/services/vector_tile.js b/modules/services/vector_tile.js index 199eb5004..e818f8535 100644 --- a/modules/services/vector_tile.js +++ b/modules/services/vector_tile.js @@ -3,7 +3,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import deepEqual from 'fast-deep-equal'; import turf_bboxClip from '@turf/bbox-clip'; import stringify from 'fast-json-stable-stringify'; -import martinez from 'martinez-polygon-clipping'; +import * as martinez from 'martinez-polygon-clipping'; import Protobuf from 'pbf'; import vt from '@mapbox/vector-tile'; @@ -65,8 +65,9 @@ function vtToGeoJSON(data, tile, mergeCache) { var merged = mergeCache[propertyhash]; if (merged && merged.length) { var other = merged[0]; - var coords = martinez( - feature.geometry.coordinates, other.geometry.coordinates, 1 /*UNION*/ + var coords = martinez.union( + feature.geometry.coordinates, + other.geometry.coordinates ); if (!coords || !coords.length) { diff --git a/package.json b/package.json index 7d7f5f25f..7b1711f77 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "fast-json-stable-stringify": "2.1.0", "lodash-es": "~4.17.15", "marked": "0.8.0", - "martinez-polygon-clipping": "0.6.0", + "martinez-polygon-clipping": "0.6.2", "node-diff3": "1.0.0", "osm-auth": "1.0.2", "pannellum": "2.4.1",