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

Feature id should accept type number #1176

Open
yukiyokotani opened this issue May 31, 2023 · 0 comments
Open

Feature id should accept type number #1176

yukiyokotani opened this issue May 31, 2023 · 0 comments

Comments

@yukiyokotani
Copy link

mapbox-gl-draw provides a number of APIs that take a feature id as an argument or return it as a return value. Currently, the API documentation states that the featureId is a string value.

However, according to the GeoJSON specification, feature id can be a string or a number, so it seems odd that mapbox-gl-draw does not consider id of type number.

If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number.
https://datatracker.ietf.org/doc/html/rfc7946#section-3.2

From the little testing I did at hand, there seemed to be no problem with mapbox-gl-draw operation even if a feature had an id of type number, but is there a reason why the current API documentation only specifies an id of type string? Also, is there any consideration to officially support id of type number?

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

No branches or pull requests

1 participant