Passing a Map entity into entity.setProperties
is not working as expected, however it’s enforced by TypeScript compiler. Using the entity.setProperties
method with a plain object works as expectec.
Example (done in chrome console).
- get initial properties: await project.getProperties(); >>> {analysis_id: ‘null’}
- set properties with Map: await project.setProperties(new Map([[‘analysis_id’, ‘9b50c885-20d3-40a7-9c44-845313b8ba5d’]])); >>> aRa {x: Uint8Array(4), a: aR7, b: 200, c: ‘OK’, d: 4, …}
- get properties: await project.getProperties(); >>> {analysis_id: ‘null’}
- set properties with plain JS object: await project.setProperties({ ‘analysis_id’: ‘9b50c885-20d3-40a7-9c44-845313b8ba5d’ }); >>> aRa {x: Uint8Array(4), a: aR7, b: 200, c: ‘OK’, d: 4, …}
- get properties >>> await project.getProperties(); >>> {analysis_id: ‘9b50c885-20d3-40a7-9c44-845313b8ba5d’}