1.

Which one of the following will set the viewport to contain given bounds?(a) fitBounds()(b) getBounds()(c) getHeading()(d) panTo()The question was posed to me during an interview for a job.This is a very interesting question from HTML Google Maps in portion Advance HTML of HTML

Answer»

Right ANSWER is (a) fitBounds()

For explanation: 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.



Discussion

No Comment Found

Related InterviewSolutions