UNPKG

google-maps-js-api-react

Version:

Fast, tree-shakable, and light-weight React components and hooks for integrating Google Maps API functionality

1 lines 1.73 kB
{"version":3,"sources":["../../src/Polygon/index.ts"],"names":["handleComponent_default","MAPS"],"mappings":";;;;;;AAOA,IAAM,OAAU,GAAAA,yCAAA,CAqBd,CAACC,sBAAA,EAAM,SAAS,CAAC,CAAA;AAEnB,IAAO,eAAQ,GAAA","file":"chunk-P7XAGAF7.cjs","sourcesContent":["import type { ComponentProps } from 'react';\nimport type { PolyHandlers } from '../types';\nimport handleComponent from '../utils/handleComponent';\nimport { MAPS } from '../utils/constants';\n\nexport type PolygonProps = ComponentProps<typeof Polygon>;\n\nconst Polygon = handleComponent<\n google.maps.Polygon,\n PolyHandlers,\n {\n /**\n * If set to `true`, the user can drag this shape over the map. The {@link google.maps.PolygonOptions.geodesic geodesic} property defines the mode of dragging.\n */\n draggable: true;\n /**\n * If set to `true`, the user can edit this shape by dragging the control points shown at the vertices and on each segment.\n */\n editable: true;\n /**\n * The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Paths are closed automatically; do not repeat the first vertex of the path as the last vertex. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are converted into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map.\n */\n paths: true;\n /**\n * Whether this polygon is visible on the map.\n */\n visible: true;\n }\n>([MAPS, 'Polygon']);\n\nexport default Polygon;\n"]}