The feature.id can only be set to number that worked

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start by tracing how vt-pbf serializes feature.id and compare the requested string ID behavior with the geojson-vt and mapbox-gl examples in the issue. Done means the generated vector tile accepts the requested string-based identifier without breaking numeric IDs; the payload names no source files or tests.

Written by the indexing model from the issue text.

Description

I try to set feature.id by geojson-vt,but this library can only set type of number,but i can set grid_id which is string on mapbox-gl works well below:

source: {
  'grid': {
    type: 'vector',
    promoteId: 'grid_id',
    tiles: ['http://test.pbf']
  }
};

Dominant language
JavaScript
Stars
206
Forks
38
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/vt-pbf

All issues in mapbox/vt-pbf

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.