{"id":16350259,"url":"https://github.com/niksy/fetch-google-maps","last_synced_at":"2025-12-12T04:26:58.281Z","repository":{"id":19312617,"uuid":"22550554","full_name":"niksy/fetch-google-maps","owner":"niksy","description":"Load Google Maps API.","archived":false,"fork":false,"pushed_at":"2017-04-18T08:40:38.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T15:03:27.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/niksy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-02T16:33:55.000Z","updated_at":"2024-09-08T03:23:54.000Z","dependencies_parsed_at":"2022-09-10T18:12:59.481Z","dependency_job_id":null,"html_url":"https://github.com/niksy/fetch-google-maps","commit_stats":null,"previous_names":["niksy/kist-loader-maps"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niksy%2Ffetch-google-maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niksy%2Ffetch-google-maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niksy%2Ffetch-google-maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niksy%2Ffetch-google-maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niksy","download_url":"https://codeload.github.com/niksy/fetch-google-maps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586236,"owners_count":21128997,"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":[],"created_at":"2024-10-11T01:02:30.068Z","updated_at":"2025-12-12T04:26:53.258Z","avatar_url":"https://github.com/niksy.png","language":"JavaScript","readme":"# fetch-google-maps\n\n[![Build Status][ci-img]][ci] [![BrowserStack Status][browserstack-img]][browserstack]\n\nLoad [Google Maps API][google-maps-api].\n\n## Install\n\n```sh\nnpm install fetch-google-maps --save\n```\n\n## Usage\n\n```js\nconst fetchGoogleMaps = require('fetch-google-maps');\n\nfetchGoogleMaps({\n\tapiKey: 'YOUR_GOOGLE_API_KEY',\n\tlanguage: 'en',\n\tlibraries: ['geometry']\n}).then(( Maps ) =\u003e {\n\tconst map = new Maps.Map(document.getElementById('map'), {\n\t\tzoom: 8,\n\t\tcenter: new Maps.LatLng(-34.397, 150.644)\n\t});\n});\n```\n\n## API\n\n### fetchGoogleMaps(options)\n\nReturns: `Promise`\n\n#### options\n\nType: `Object`\n\n##### apiKey\n\nType: `String`  \n**Required**\n\n[Google API key](https://developers.google.com/maps/documentation/javascript/get-api-key).\n\n##### version\n\nType: `Number`  \nDefault: `3`\n\n[Google Maps API version](https://developers.google.com/maps/documentation/javascript/versions).\n\n##### language\n\nType: `String`  \nDefault: `'en'`\n\n[Language](https://developers.google.com/maps/documentation/javascript/localization) for Google Maps UI.\n\n##### libraries\n\nType: `String[]`\n\nList of [Google Maps libraries](https://developers.google.com/maps/documentation/javascript/libraries) to load.\n\n## Test\n\nYou need to have process variable `OSS_GOOGLE_API_KEY` set.\n\nFor local automated tests, run `npm run test:automated:local`.\n\nFor manual tests, run `npm run test:manual:local` and open \u003chttp://localhost:9000/\u003e in your browser.\n\n## Browser support\n\nTested in IE9+ and all modern browsers. Uses Promises so you need to apply [polyfill][promise-polyfill].\n\n## Acknowledgments\n\n* Wrapper around [basic Google Maps fetching][basic-google-maps-fetching].\n\n## License\n\nMIT © [Ivan Nikolić](http://ivannikolic.com)\n\n[ci]: https://travis-ci.org/niksy/fetch-google-maps\n[ci-img]: https://travis-ci.org/niksy/fetch-google-maps.svg?branch=master\n[browserstack]: https://www.browserstack.com/\n[browserstack-img]: https://www.browserstack.com/automate/badge.svg?badge_key=RGhpWUE4L2ZEeFlJK3c2MEczYmFmOVUzTExqY3VaVDFaVkZyZjRCbFBGUT0tLUJlRUhiajBpS1VGZFNFaU1XdVRKU2c9PQ==--d2f9e67e34833c7263b15c40b6e3a56ce5772cbd\n[basic-google-maps-fetching]: https://gist.github.com/GFoley83/5953448\n[promise-polyfill]: https://github.com/calvinmetcalf/lie\n[google-maps-api]: https://developers.google.com/maps/documentation/javascript/tutorial\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniksy%2Ffetch-google-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniksy%2Ffetch-google-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniksy%2Ffetch-google-maps/lists"}