Conversation
# Conflicts: # src/source/geojson_worker_source.ts # src/ui/map.ts
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
* Remove experimental * Reduce diff * Code simplification * Remove parameters from getdata * Fix test * Fix tests * Bring back commented out code * Fix lint * Remove getData * Remove supercluster types, update bundle json * Fix hardcoded clip start and end parameters * This time for real.
|
@HarelM It looks sooooo much better... |
|
Ok, only one test is failing now. |
|
@HarelM I copied places.json into geojson-vt and old supercluster lib and compared the 0,0,0 tile generated: test('generates clusters properly', () => {
const index = new ClusterTileIndex({radius: 25});
index.load(places2.features);
const tile = index.getTile(0, 0, 0);
writeFileSync('out.json', JSON.stringify(tile.features));
});Both tiles contained 58 points, and JSON.stringify(tile.features)===JSON.stringify(tile.features) (new geojson-vt -> old supercluster lib) was an exact match in both libraries. The only difference was the tile metadata {transformed: true, source: null, x: 0, y: 0, z: 0} in the newer. In other words, no progress, but wanted to let you know. |
|
Did you pass the same cluster parameters? |
|
Only the radius |
|
I was able to reproduce this fairly easily on maplibre by replacing the initialization in the factory method. What you did sounds like what I would've done to try and reproduce this, but I'll give it anothe go early next week nevertheless. |
|
Found it: fixes it. however, when applying a source diff the features would be wrapped there as well. so i think the solution may be to update expected.png in the test. |
|
Can you better explain why updating the image is the right solition? |
|
Feel free to update the image and I'll merge this. I think both options are valid I guess, aligning then to the same processing makes sense. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7172 +/- ##
==========================================
+ Coverage 92.68% 92.70% +0.02%
==========================================
Files 289 289
Lines 24085 24073 -12
Branches 5102 5108 +6
==========================================
- Hits 22322 22316 -6
+ Misses 1763 1757 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Might be interesting to increase coverage while we are at it. |
|
In order to hardcode updateable I had to remove the non-updateable tests.. let me know what you think. The tests weren't very good anyway because they simulated geojsonvt worker options that don't exist. But we still have to consider geojson sources without ids... |
|
Fyi also see the |

In progress...
CHANGELOG.mdunder the## mainsection.