Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to binary mode in MVTLayer #6282

Merged
merged 3 commits into from Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api-reference/geo-layers/mvt-layer.md
Expand Up @@ -121,7 +121,7 @@ Note that by default, the `MVTLoader` parses data using web workers, with code l

##### `binary` (Boolean, optional)

* Default: false
* Default: true

Use tile data in [binary format](https://github.com/visgl/loaders.gl/blob/master/modules/gis/docs/api-reference/geojson-to-binary.md) to improve performance (2-3x faster on large datasets). It removes the need for serialization and deserialization of data transferred by the worker back to the main process.

Expand Down
2 changes: 1 addition & 1 deletion modules/geo-layers/src/mvt-layer/mvt-layer.js
Expand Up @@ -18,7 +18,7 @@ const defaultProps = {
uniqueIdProperty: {type: 'string', value: ''},
highlightedFeatureId: null,
loaders: [MVTWorkerLoader],
binary: false
binary: true
};

export default class MVTLayer extends TileLayer {
Expand Down
1 change: 1 addition & 0 deletions test/modules/core/lib/picking.spec.js
Expand Up @@ -74,6 +74,7 @@ TestMVTLayer.componentName = 'TestMVTLayer';
const testMVTLayer = new TestMVTLayer({
id: 'test-mvt-layer',
autoHighlight: true,
binary: false,
data: geoJSONData
});

Expand Down