inocan-group / vue3-google-map

A set of composable components for easy use of Google Maps in your Vue 3 projects.
https://vue3-google-map.com
MIT License
272 stars 54 forks source link

Fit Bounds for Polygon #79

Closed teguhsatria892 closed 2 years ago

teguhsatria892 commented 2 years ago

how i can fit bounds for polygon??

teguhsatria892 commented 2 years ago

ignore it, i get solution


centerPolygonMiniMap(){
            var bounds = new window.google.maps.LatLngBounds()

            this.googleMapMiniData.polygonDataList[0].paths.forEach(path=> {
                bounds.extend(path)
            })

            this.$refs.googleMapMiniDetail.map.fitBounds(bounds)
      },