mapbox-gl-js version: 0.50.0
browser: Any
Steps to Trigger Behavior
- Load any GeoJSON with string
id on features and Array or Object as properties
- Catch any mouse event with a
features property or use any query*Features helper
- Look at the missing
id and the stringified properties on features
Link to Demonstration
https://jsfiddle.net/dcwp7xu4/1/
Expected Behavior
The feature string id is present on the feature object and properties are restitued as provided (same type, same content) by the source GeoJSON (and as specified in the GeoJSON specifications)
Actual Behavior
- String identifier (
id) is missing on the features
- Arrays and objects are stringified
Related issues
It seems to be a recurring issue on different levels:
Most of them didn't had advancement for months or years.
There is even a merged pull request hardening this behavior #7106 (String identifier is a really common use case so why force number ID instead of ensuring string are properly handled)
mapbox-gl-js version: 0.50.0
browser: Any
Steps to Trigger Behavior
idon features andArrayorObjectas propertiesfeaturesproperty or use anyquery*Featureshelperidand the stringifiedpropertieson featuresLink to Demonstration
https://jsfiddle.net/dcwp7xu4/1/
Expected Behavior
The feature string
idis present on the feature object andpropertiesare restitued as provided (same type, same content) by the source GeoJSON (and as specified in the GeoJSON specifications)Actual Behavior
id) is missing on the featuresRelated issues
It seems to be a recurring issue on different levels:
properties#4380idproperty on internal GeoJSON objects #3210Most of them didn't had advancement for months or years.
There is even a merged pull request hardening this behavior #7106 (String identifier is a really common use case so why force number ID instead of ensuring string are properly handled)