Hi!
Maybe this can help: https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets-property-types
It says it is passed to the client component as a Big.
Thanks to a colleague of mine, I now have the answer to this question. The correct way to use a decimal in the widget is indeed
const myDecimalNumber = parseFloat(this.props.latitude.value)
However, what was happening is that my StreetView component was rendering initially when the value was still loading. When the value was finally loaded, the component does not re-render.
Note that same as you can find “.value” to get the value, you can also call “.status” to see whether it is loaded or not. I think it is either “Available” or “Loading”. With this, we were able to only render once the value is loaded:
class StreetView extends Component {
render() {
if(this.props.latitude.status!=="available" && this.props.longitude!=="available"){
return <div></div>;
}
return <View
latitude={this.props.latitude.value || 0}
longitude={this.props.longitude.value || 0} />;
}
}
That’s it!