cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an fitBounds method or equivalent in sap.ui.vbm.VBI?

avital_ben-natan
Explorer
0 Kudos

My scenario is as follows. I am providing a location search field which displays the map at the location selected. The geocoding request from the search returns the bounding diagonal {NE, SW} of the location's area.

I would like to fit the bounds of the map control to those of the searched location.

Leaflet and Google Maps both have the fitBounds method which does exactly what I need. It pans and zooms the map to fit the a bounding box.

Any help would be greatly appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182119
Active Participant
0 Kudos

Hi!

There is no function exactly matching your request. However, function zoomToGeoPosition will do what you want. You can give multiple positions to it, e.g. NE and SW, and will zoom map accordingly.

Cheers Uwe