MCPcopy Index your code
hub / github.com/visgl/react-google-maps / getPathsArray

Function getPathsArray

src/components/polygon.tsx:60–67  ·  view source on GitHub ↗

* Extracts paths as a nested array from a Polygon instance.

(polygon: google.maps.Polygon)

Source from the content-addressed store, hash-verified

58 * Extracts paths as a nested array from a Polygon instance.
59 */
60function 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
69function usePolygon(props: PolygonProps) {
70 const {

Callers 2

usePolygonFunction · 0.85
handlePathsChangeFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected