Select to view content in your preferred language

Change View properties from external SAP UI5 function

1020
1
Jump to solution
07-07-2019 02:50 AM
GeorgeAbraham1
Occasional Contributor

I have created a MapView using JS API 4.12 and loaded the map in SAP UI5.

var view = new MapView({
container: mapDivId,
map: webmap, //map,
center: centerPoint,
zoom: zoomLevel
});

Now, say I have a list/drop down control in UI5 and I want to change the MapView center co-ordinates and zoom value according to the location selected, I am not able to do get the object reference of the MapView as there is no ID field associated to it - even checked via Inspect Element and don't see an option.

Any help how I can access the MapView from a different function and then change its properties? I know I can do view.goTo or other option - but I am not able to get the View reference from outside.

0 Kudos
1 Solution

Accepted Solutions
GeorgeAbraham1
Occasional Contributor

I have a workaround to this by creating a custom control from SAP UI5.

View solution in original post

0 Kudos
1 Reply
GeorgeAbraham1
Occasional Contributor

I have a workaround to this by creating a custom control from SAP UI5.

0 Kudos