qfes / rdeck

Deck.gl widget for R
https://qfes.github.io/rdeck
MIT License
98 stars 0 forks source link

named vectors supplied as palettes get translated to keyed js objects instead of arrays #17

Closed MilesMcBain closed 3 years ago

MilesMcBain commented 3 years ago

Map breaks with:

react.js:9 TypeError: e.palette.map is not a function
    at L (rdeck.js:1)
    at rdeck.js:1
    at Array.map (<anonymous>)
    at rdeck.js:1
    at new x (rdeck.js:1)
    at create (rdeck.js:1)
    at Array.map (<anonymous>)
    at V (rdeck.js:1)
    at ro (react.js:9)
    at Hu (react.js:9)

R does warn:

Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON.
MilesMcBain commented 3 years ago

could be my version of jsonlite?

[1] C:/Users/msmcbain/libs/R [2] C:/R/R-4.0.2/library

anthonynorth commented 3 years ago

Will be fixed in 0.3

anthonynorth commented 3 years ago

closed in #18