Skip to content

Commit

Permalink
Pin to older tilebelt to support antimeridian
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Apr 19, 2023
1 parent 6993b05 commit d711cf3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
},
"dependencies": {
"@mapbox/tile-cover": "^3.0.2"
},
"resolutions": {
"@mapbox/tilebelt": "1.0.1"
}
}
33 changes: 33 additions & 0 deletions test/data/PolygonAntimeridianGeometry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Polygon",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-180.001, 40.4],
[-179.999, 40.4],
[-179.999, 40.41],
[-180.001, 40.41],
[-180.001, 40.4]
]
]
},
"expected": {
"0": ["5192650370358181887", "5192650370358181887"],
"10": ["5233886493100998655", "5235387665775329279"],
"17": [
"5265411686332628991",
"5265411686334201855",
"5265411686334726143",
"5265411686340493311",
"5265411686341017599",
"5265411686342590463",
"5266912886207807487",
"5266912886208331775",
"5266912886209904639",
"5266912886210428927",
"5266912886216196095",
"5266912886216720383"
]
}
}
2 changes: 2 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ import MultiPointGeometry from './data/MultiPointGeometry.json';
import LineStringGeometry from './data/LineStringGeometry.json';
import MultiLineStringGeometry from './data/MultiLineStringGeometry.json';
import PolygonGeometry from './data/PolygonGeometry.json';
import PolygonAntimeridianGeometry from './data/PolygonAntimeridianGeometry.json';
import MultiPolygonGeometry from './data/MultiPolygonGeometry.json';
const testCases = [
PointGeometry,
MultiPointGeometry,
LineStringGeometry,
PolygonGeometry,
PolygonAntimeridianGeometry,
MultiPolygonGeometry
];

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
dependencies:
"@mapbox/tilebelt" "^1.0.1"

"@mapbox/tilebelt@^1.0.1":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@mapbox/tilebelt/-/tilebelt-1.0.2.tgz#32936c3acad3ea3e669bb083a598bcc7d74b4ec9"
integrity sha512-tGJN2VIgWrXqBTPIxFVklklIpcy6ss8W5ouq+cjNLXPXFraRaDR4Ice+5Q8/uLX+6aH23lWBMydOIn8PcdVcpA==
"@mapbox/tilebelt@1.0.1", "@mapbox/tilebelt@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@mapbox/tilebelt/-/tilebelt-1.0.1.tgz#d57a1c4a5445e928dad720a828389a0a69db8818"
integrity sha512-62FkRJcrvxjH4FaqM8ePdK4TM9XcNkghaGlFnbdLbOgjk0FfQ5Pqr3QZkOOpuOLxMRMOsWsZfL3AcffiPCYBJQ==

"@types/eslint-scope@^3.7.3":
version "3.7.4"
Expand Down

0 comments on commit d711cf3

Please sign in to comment.