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

Add initial MLT support #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add initial MLT support #1

wants to merge 6 commits into from

Conversation

ebrelsford
Copy link

Adds initial MLT support.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
const tilesetMetadata = TileSetMetadata.fromBinary(metadata);

const vectorTile = new vt.VectorTile(
new Uint8Array(response.data),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new Uint8Array allocation may be expensive. We should investigate why this seems needed and how to avoid this so we can pass the response.data directly. Perhaps create a ticket on this and I can take a closer look?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm down to open an issue for this, the root of it is that the decoder needs a Uint8Array but we're getting an ArrayBuffer here. It seems like Uint8Array is the common type between node and the browser here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A similar conversion may be happening in pbf here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants