{"id":21171193,"url":"https://github.com/realadvisor/rgm","last_synced_at":"2025-04-05T14:08:30.849Z","repository":{"id":65490102,"uuid":"261567173","full_name":"realadvisor/rgm","owner":"realadvisor","description":"Tiny (1kb less) but very powerful React Google Map","archived":false,"fork":false,"pushed_at":"2020-10-16T13:03:23.000Z","size":5301,"stargazers_count":226,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T13:11:19.821Z","etag":null,"topics":["clusters","geojson","google","googlemaps","marker","react"],"latest_commit_sha":null,"homepage":"https://realadvisor.github.io/rgm/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realadvisor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-05T19:41:32.000Z","updated_at":"2025-02-11T21:35:00.000Z","dependencies_parsed_at":"2023-01-26T00:46:20.975Z","dependency_job_id":null,"html_url":"https://github.com/realadvisor/rgm","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realadvisor%2Frgm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realadvisor%2Frgm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realadvisor%2Frgm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realadvisor%2Frgm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realadvisor","download_url":"https://codeload.github.com/realadvisor/rgm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345854,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clusters","geojson","google","googlemaps","marker","react"],"created_at":"2024-11-20T16:03:17.063Z","updated_at":"2025-04-05T14:08:30.815Z","avatar_url":"https://github.com/realadvisor.png","language":"JavaScript","readme":"# RGM\n\nTiny [1kb less](size-snapshot.txt#L4-L5) but very powerful React Google Map.\n\nIt allows you to render any React component on the Google Map, and provides easy access to native google map api.\n\n[examples](https://realadvisor.github.io/rgm), [examples source](pages)\n\n## Example\n\n```jsx\nimport { Map, Overlay, Marker } from 'rgm';\n...\n\n\u003cMap api={api} options={MAP_OPTIONS}\u003e\n  \u003cOverlay debug={debug}\u003e\n    \u003cMarker lat={lat} lng={lng}\u003e\n      \u003cReactComponent /\u003e\n    \u003c/Marker\u003e\n  \u003c/Overlay\u003e\n\u003c/Map\u003e\n```\n\n## Install\n\n```bash\nyarn add rgm\n# or\nnpm install rgm\n```\n\n## API\n\n### Map\n\nDraws google map.\n\n_properties_:\n\n- **api** non nullable value of _window.google.maps_\n\n- **options** see [MapOptions](https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions)\n  or _(elt:HTMLDivElement) =\u003e MapOptions_ where _elt_ is map holder element.\n\n- **ref** exposes instance of [google.maps.Map](https://developers.google.com/maps/documentation/javascript/reference/map)\n\n### Overlay\n\nCreates [overlay](https://developers.google.com/maps/documentation/javascript/examples/overlay-simple) to place React components inside.\n\n_properties_:\n\n- **debug** to control React component placements in dev mode [see example](https://realadvisor.github.io/rgm/react-markers)\n\n### Marker\n\nWrapper around your component to pass _lat_, _lng_ into _Overlay_ in a type safe way without touching props of your component.\n\n_properties_:\n\n- **lat** latitude\n- **lng** longitude\n\n### useMap\n\nhook to get access to instances of [google.maps.Map](https://developers.google.com/maps/documentation/javascript/reference/map) and _window.google.maps_.\n\n_returns:_\n\n- { api, map } object, where _api_ is equal to _window.google.maps_ and _map_ is instance of [google.maps.Map](https://developers.google.com/maps/documentation/javascript/reference/map)\n\n## Types\n\nFlowtype, Typescript.\n\n_For typescript usage you probably need to add [@types/googlemaps](https://www.npmjs.com/package/@types/googlemaps) into your project._\n\n## Contribute\n\nGet your api key at [Google](https://developers.google.com/maps/documentation/javascript/get-api-key)\n\nThen start dev environment.\n\n```bash\nGOOGLE_API_KEY=\u003cYOUR GOOGLE API KEY\u003e yarn dev\n```\n\n## Why\n\n_Why another library having that one of current library authors is also creator of [google-map-react](https://github.com/google-map-react/google-map-react)_\n\nReact map libraries along with the ability to draw react on a map are also trying to provide access to google map via declarative API. It needs a lot of hacks, code and opinionated decisions.\n\nWe created a library with ability to draw react components on a map providing minimal subset of properties needed to use native api or create any additional declarative api.\n\nSoon will be 1 year as we are happy with it. Small amount of code makes it easy to support and extend.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealadvisor%2Frgm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealadvisor%2Frgm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealadvisor%2Frgm/lists"}