Home » HTML » HTML APIs » Question
  1. Which one of the following will set the viewport to contain given bounds?
    1. getBounds()
    2. fitBounds()
    3. panTo()
    4. getHeading()
    5. None of these
Correct Option: B

fitBounds() method sets viewport to contain given bounds. Its parameters are LAtLngBounds. The return value of getBounds() is LatLng, LatLng. getHeading will return compass heading of the aerial imager. Its return type is number. The center of the map to the given LatLng can be changed by the panTo() event.



Your comments will be displayed only after manual approval.