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.
Solved! Go to Solution.
I have a workaround to this by creating a custom control from SAP UI5.
I have a workaround to this by creating a custom control from SAP UI5.