cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bindThings with expand for IoT /CompositeThings/v1/Things

mayankpariharIB
Explorer
0 Likes
366

Hi experts,

I am using IOTAS-ADVANCEDLIST-THING-ODATA endpoints from SAP IoT Leonardo.

I have created the UI5 IoT Application from Template with iot:IoTMap.

I am sending the longitude and latitude using property sets.

I want to use things binding for the IoTMap dynamically in the controller onInit() method.

I am trying the following function to bind my things using extend parameter to my Map.

_bindThings: function() {

var oMap = this.getView().byId('myIotmap');

var oTemplate = this.getView().byId('singleLogger');

oMap.bindThings({

path: "/Things",

template: oTemplate,

templateShareable: true,

parameters: { expand: "DYN_ENT_my_package__PropertySet_GNSS" }

});

Unfortunately I am getting following error in response

code> Could not find property with name: 'DYN_ENT_my_package__PropertySet_GNSS'. </code>

but when i am binding the Map directly to the XML view using

<iot:IoTMap id="iotmap" things="{path:'/Things',parameters:{expand:' DYN_ENT_my_package__PropertySet_GNSS '}}" enableClustering="true" centerPosition="10;50;0.0" zoomlevel="7" height="25rem">

It works and I am able to see the IoT thing on map.

What is the correct way to bind things dynamically and use parameters and filters for IoT maps?

I want to use following Odata call with my controller to bind my MAP:

https://advancedlist-thing-sap.cfapps.eu10.hana.ondemand.com/CompositeThings/v1/Things?%24expand=DYN...

Accepted Solutions (0)

Answers (2)

Answers (2)

mayankpariharIB
Explorer
0 Likes

Hello,

We have resolved issue with IoT Control team.

Following is the solution:

1) Taking Templet element with XML is not supported (

var oTemplate = this.getView().byId('thingElement'));

in xml view

<iotele:IoTMapElement id="thingElement".... >

2) We have created IoTMapElements dynamically using factory function

var oTemplate = new sap.ui.iot.elements.IoTMapElement({
latitude:"{MyProperty_Set/GNSS.latitude}",
longitude:"{MyProperty_Set/GNSS.longitude}",
thingid:"{{MyProperty_Set/GNSS.ThingId}"});

Then the odatacall are binding now.

Unfortunatly the library where the resources are can be only identify with downloaded library files as no good documentation available currently.

marcus_behrens1
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi, I understand you opened a ticket on this. Would be great if you could provide an update here on how the ticket is resolved. It might help others with similar issues or questions. Regards, Marcus