AnsweredAssumed Answered

Change View properties from external SAP UI5 function

Question asked by george.abraham1912 on Jul 7, 2019
Latest reply on Jul 18, 2019 by george.abraham1912

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.