Closed dsumah closed 1 year ago
Not sure this is supported out of the box. You will have to use the native api to fit bounds. You could check the advanced usage section of the docs.
var bounds = new window.google.maps.LatLngBounds()
bounds.extend(pathA)
bounds.extend(pathB)
...
bounds.extend(pathN)
this.$mapRef.value.map.fitBounds(bounds)
in the above, mapRef is the reference to your google map(see advanced usage)
If you have a list of LatLng values, you could loop over and extend the bounds for each of the value in thelist.
Hi guys. How do I go about setting the correct bounds for my map? What I am trying to achieve is a situation where my polyline fits or almost fits the screen.
It wil be nice if someone can point to where the docs speaks about setting bounds