* Extracts paths as a nested array from a Polygon instance.
(polygon: google.maps.Polygon)
| 58 | * Extracts paths as a nested array from a Polygon instance. |
| 59 | */ |
| 60 | function getPathsArray(polygon: google.maps.Polygon): google.maps.LatLng[][] { |
| 61 | const mvcPaths = polygon.getPaths(); |
| 62 | const result: google.maps.LatLng[][] = []; |
| 63 | for (let i = 0; i < mvcPaths.getLength(); i++) { |
| 64 | result.push(mvcPaths.getAt(i).getArray()); |
| 65 | } |
| 66 | return result; |
| 67 | } |
| 68 | |
| 69 | function usePolygon(props: PolygonProps) { |
| 70 | const { |
no test coverage detected