CartoDB / mobile-carto-libs

Internal dependencies for CARTO Mobile SDK
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

cant compare nuti value with int #23

Closed farfromrefug closed 2 years ago

farfromrefug commented 2 years ago

If you have a property like osmid inside features and that you want to do something like:

when ([nuti::selected_id] = [osmid])

Then it cant work because nuti::selected_id must be a string. Then the comparaison between the 2 wont work.

Maybe the easiest solution would be to add a toString method in expressions?

mtehver commented 2 years ago

If you are using setStyleParameter method of MBVectorTileDecoder then the string value is automatically converted to the correct type. The correct type is based on the default value in your style.json file.

farfromrefug commented 2 years ago

@mtehver was not sure of that. Will try thanks!

farfromrefug commented 2 years ago

@mtehver i can confirm it works