{"_id":"@bract-tech/google-maps-dll","_rev":"4-8eb3906fb4f819f2eadc455cc27c040f","name":"@bract-tech/google-maps-dll","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@bract-tech/google-maps-dll","version":"0.0.1","keywords":["google","maps","api","bootstrap","javascript"],"author":{"url":"https://bract.tech","name":"Bract Technologies","email":"opensource@bract.tech"},"license":"Apache-2.0","_id":"@bract-tech/google-maps-dll@0.0.1","maintainers":[{"name":"bract-bombus","email":"opensource@bract.tech"},{"name":"clitsonbelleau","email":"dev@clitson.nl"}],"contributors":[{"name":"Clitson Belleau","email":"clbe-c384@bract.tech"}],"homepage":"https://github.com/bract-tech/google-maps-dll","bugs":{"url":"https://github.com/bract-tech/google-maps-dll/issues"},"dist":{"shasum":"31cec9fc97e6ca6581bc47ebaa37c2384641c1a6","tarball":"https://registry.npmjs.org/@bract-tech/google-maps-dll/-/google-maps-dll-0.0.1.tgz","fileCount":7,"integrity":"sha512-dlymSjpxAwaX7BFSvZ+skuQ5CnIC2Slg++lKJNhtuKOafKhgst9rl/joNe1oc7pQPjMR9cj+RDS2NoYpskwP3w==","signatures":[{"sig":"MEUCIEv3LJ3S3eTiWEZW0+KlG1/p9nrpXCelUxluOosG7LPbAiEAov5jmqA+mXtwR5TpaCKSkadm+OdXYkLoBYir88rcOGY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23467},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"9c03523215525b430a79a4b607ae0a973bece71e","scripts":{"build":"rm -rf dist && tsc","prepare":"npm run build"},"_npmUser":{"name":"clitsonbelleau","email":"dev@clitson.nl"},"repository":{"url":"git+https://github.com/bract-tech/google-maps-dll.git","type":"git"},"_npmVersion":"10.9.2","description":"Load the Google Maps JavaScript API","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"tag":"latest","access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/google-maps-dll_0.0.1_1781788116815_0.5098072650621581","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bract-tech/google-maps-dll","version":"0.0.2","keywords":["google","maps","api","bootstrap","javascript"],"author":{"url":"https://bract.tech","name":"Bract Technologies","email":"opensource@bract.tech"},"license":"Apache-2.0","_id":"@bract-tech/google-maps-dll@0.0.2","maintainers":[{"name":"bract-bombus","email":"opensource@bract.tech"},{"name":"clitsonbelleau","email":"dev@clitson.nl"}],"contributors":[{"name":"Clitson Belleau","email":"clbe-c384@bract.tech"}],"homepage":"https://github.com/bract-tech/google-maps-dll","bugs":{"url":"https://github.com/bract-tech/google-maps-dll/issues"},"dist":{"shasum":"d262d50aae49c64bf75fc0437a4403c2e1ca4d16","tarball":"https://registry.npmjs.org/@bract-tech/google-maps-dll/-/google-maps-dll-0.0.2.tgz","fileCount":7,"integrity":"sha512-Q1sxk1BgcX0QUKTG/UO6qSfBnyLSEqi+Id0xppg21xN4vl/H6oRUJVunpHd8/eGuCYkOi9r6TuL1uiFeNjb4+Q==","signatures":[{"sig":"MEUCIEuwwWoMqLfiTTupmHe0F5nvwy7KVaX8x3r0kUX001yGAiEAwMn2hLNMTNE+sWkLEqTTrraAOxEm45lW+Tjqewoxr8w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23467},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"9c03523215525b430a79a4b607ae0a973bece71e","scripts":{"build":"rm -rf dist && tsc","prepare":"npm run build"},"_npmUser":{"name":"bract-bombus","email":"opensource@bract.tech"},"repository":{"url":"git+https://github.com/bract-tech/google-maps-dll.git","type":"git"},"_npmVersion":"10.9.2","description":"Load the Google Maps JavaScript API","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"tag":"latest","access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/google-maps-dll_0.0.2_1781788760247_0.3860142598161522","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@bract-tech/google-maps-dll","version":"1.0.0","keywords":["google","maps","api","bootstrap","javascript"],"author":{"url":"https://bract.tech","name":"Bract Technologies","email":"opensource@bract.tech"},"license":"Apache-2.0","_id":"@bract-tech/google-maps-dll@1.0.0","maintainers":[{"name":"bract-bombus","email":"opensource@bract.tech"},{"name":"clitsonbelleau","email":"dev@clitson.nl"}],"contributors":[{"name":"Clitson Belleau","email":"clbe-c384@bract.tech"}],"homepage":"https://github.com/bract-tech/google-maps-dll","bugs":{"url":"https://github.com/bract-tech/google-maps-dll/issues"},"dist":{"shasum":"e30e0cb6e3dcf52b573a33922f6039f429be9343","tarball":"https://registry.npmjs.org/@bract-tech/google-maps-dll/-/google-maps-dll-1.0.0.tgz","fileCount":7,"integrity":"sha512-w5qtCd3VW4P01S3qhUOc08YLAI02SFPgpZ4qzJXQhK9n2Chl1GzrO0/0Silsja9bkttLypobQExRxMW5RdHjnA==","signatures":[{"sig":"MEYCIQCFaO0IF3vrWfLVehULNaUj5oGGRn0EHFdcPf1q3GYmwgIhAPdH1XkpmPpdf01IgvfeW8reWGN/jWnIm2Wxh9QRRJe3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23467},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"89909780effd67da11d1459ff2b244080e774dc6","scripts":{"build":"rm -rf dist && tsc","prepare":"npm run build"},"_npmUser":{"name":"bract-bombus","email":"opensource@bract.tech"},"repository":{"url":"git+https://github.com/bract-tech/google-maps-dll.git","type":"git"},"_npmVersion":"10.9.2","description":"Load the Google Maps JavaScript API","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"tag":"latest","access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/google-maps-dll_1.0.0_1781793665127_0.27785283303917474","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bract-tech/google-maps-dll","version":"1.0.1","description":"Load the Google Maps JavaScript API","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc","prepare":"npm run build"},"homepage":"https://git.bract.tech/google-maps-dll","bugs":{"url":"https://github.com/bract-tech/google-maps-dll/issues"},"repository":{"type":"git","url":"git+https://github.com/bract-tech/google-maps-dll.git"},"author":{"name":"Bract Technologies","email":"opensource@bract.tech","url":"https://bract.tech"},"contributors":[{"name":"Clitson Belleau","email":"clbe-c384@bract.tech"}],"license":"Apache-2.0","keywords":["google","maps","api","astro","angular","apphosting","firebase","javascript"],"devDependencies":{"typescript":"^5.9.3"},"publishConfig":{"tag":"latest","registry":"https://registry.npmjs.org","access":"public"},"_id":"@bract-tech/google-maps-dll@1.0.1","gitHead":"50ab2d3a4094a244b4e56ce497f42b40670cea7c","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-m+n1BylwMSoy9THGnW5svtajkxlof/9EltDm+hu8gKMEt3gYXB3IXb056n3HvzaairTCyhwWuep15ZTRuKlbVw==","shasum":"e8683c6099ed0e0cd5b5faf8bb2129a2ac13c585","tarball":"https://registry.npmjs.org/@bract-tech/google-maps-dll/-/google-maps-dll-1.0.1.tgz","fileCount":7,"unpackedSize":24636,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDW3CdnBskdluehPEuHtDDuvNizM0cSV4QPVG17NgMefgIgfYRiLL5+JFrVKSQmd3cvn9P0nQvSWkvMTcp6Ija7uZo="}]},"_npmUser":{"name":"bract-bombus","email":"opensource@bract.tech"},"directories":{},"maintainers":[{"name":"bract-bombus","email":"opensource@bract.tech"},{"name":"clitsonbelleau","email":"dev@clitson.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/google-maps-dll_1.0.1_1782868158541_0.7999128539161595"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T13:08:36.671Z","modified":"2026-07-01T01:09:18.843Z","0.0.1":"2026-06-18T13:08:36.988Z","0.0.2":"2026-06-18T13:19:20.385Z","1.0.0":"2026-06-18T14:41:05.262Z","1.0.1":"2026-07-01T01:09:18.683Z"},"bugs":{"url":"https://github.com/bract-tech/google-maps-dll/issues"},"author":{"name":"Bract Technologies","email":"opensource@bract.tech","url":"https://bract.tech"},"license":"Apache-2.0","homepage":"https://git.bract.tech/google-maps-dll","keywords":["google","maps","api","astro","angular","apphosting","firebase","javascript"],"repository":{"type":"git","url":"git+https://github.com/bract-tech/google-maps-dll.git"},"description":"Load the Google Maps JavaScript API","contributors":[{"name":"Clitson Belleau","email":"clbe-c384@bract.tech"}],"maintainers":[{"name":"bract-bombus","email":"opensource@bract.tech"},{"name":"clitsonbelleau","email":"dev@clitson.nl"}],"readme":"# google-maps-dll\r\n\r\nA lightweight wrapper for the new Maps JavaScript API bootstrap loader based on Google's [Dynamic Library Import](https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import) script. No dependencies. No instance management.\r\n\r\nFollow the links below for more information:\r\n- [Maps JavaScript API documentation](https://developers.google.com/maps/documentation/javascript/load-maps-js-api)\r\n- [Blog post: More Control Loading the Maps JavaScript API](https://mapsplatform.google.com/resources/blog/more-control-loading-maps-javascript-api/)\r\n\r\n## Installation\r\n\r\n```shell\r\nnpm install @bract-tech/google-maps-dll\r\n```\r\n\r\n### Import bootstrap loader\r\n\r\n```ts\r\nimport { loadGoogleMaps } from '@bract-tech/google-maps-dll';\r\n```\r\n\r\n### Initialize bootstrap loader parameters\r\n\r\n```ts\r\nloadGoogleMaps({ key: GOOGLE_MAPS_API_KEY });\r\n```\r\n\r\n### Import Google Maps API libraries\r\n\r\n```js\r\nconst [\r\n  { ... },\r\n] = await Promise.all([\r\n  google.maps.importLibrary(\"...\"),\r\n]);\r\n```\r\n\r\n### TypeScript stuff ([docs][tsdoc])\r\n\r\n#### Install the types for the Google Maps JavaScript API\r\n\r\n```\r\nnpm i -D @types/google.maps\r\n```\r\n\r\n#### Add the types to the `compilerOptions` in `tsconfig.json`\r\n\r\n```json\r\n{\r\n  \"compilerOptions\": {\r\n    \"types\": [\"google.maps\"]\r\n  }\r\n}\r\n```\r\n\r\n#### Add the required types within the `initMap` function\r\n\r\n```ts\r\nasync function initMap(): Promise<void> {\r\n\r\nconst [...] = await Promise.all([...]) as any;\r\n```\r\n\r\n## Usage\r\n\r\n```html\r\n<div id=\"map\" style=\"width: 300px; height: 300px;\"></div>\r\n```\r\n\r\n```html\r\n<script type=\"module\">\r\n  import { loadGoogleMaps } from '@bract-tech/google-maps-dll';\r\n\r\n  const GOOGLE_MAPS_API_KEY = '...';\r\n  if (!GOOGLE_MAPS_API_KEY) {\r\n    console.error(\"Google Maps API key is missing.\");\r\n  }\r\n\r\n  async function initMap() {\r\n\r\n    const mapElement = document.getElementById(\"map\");\r\n    const center = { lat: 37.4218066, lng: -122.085917 }\r\n\r\n    try {\r\n      loadGoogleMaps({\r\n        key: GOOGLE_MAPS_API_KEY\r\n        // ...\r\n      });\r\n\r\n      const [\r\n        { Map, MapTypeId },\r\n        { AdvancedMarkerElement },\r\n        // { ... },\r\n      ] = await Promise.all([\r\n        google.maps.importLibrary(\"maps\"),\r\n        google.maps.importLibrary(\"marker\"),\r\n        // google.maps.importLibrary(\"...\"),\r\n      ]);\r\n\r\n      google.maps.Map = new Map(mapElement, {\r\n        center,\r\n        zoom: 18,\r\n        mapId: '...', // Required for AdvancedMarkerElement (https://developers.google.com/maps/documentation/javascript/map-ids/get-map-id)\r\n        mapTypeId: MapTypeId.ROADMAP,\r\n        // ...\r\n      });\r\n\r\n      google.maps.marker.AdvancedMarkerElement = new AdvancedMarkerElement({\r\n        map: google.maps.Map,\r\n        position: center,\r\n        // ...\r\n      });\r\n\r\n      // ...\r\n\r\n    } catch (e) {\r\n      console.error(\"Failed to load Google Maps\", e);\r\n    }\r\n  }\r\n\r\n  initMap();\r\n</script>\r\n```\r\n\r\n## `loadGoogleMaps(options: LoaderOptions): void`\r\n\r\n- `key: string`: Your API key. This is the only required option.\r\n- `v: string`: The API version to use.\r\n- `language: string`: Language to use for controls, notices, and responses.\r\n- `region: string`: Region code to alter API behavior.\r\n- `libraries: string[]`: Additional API libraries to load.\r\n- `authReferrerPolicy: string`: Limits which URLs can use the API key.\r\n- `mapIds: string[]`: Preloads configuration for specific map IDs.\r\n- `channel: string`: Tracks usage per channel.\r\n- `solutionChannel: string`: Tracks usage per solution channel.\r\n\r\n[tsdoc]: https://developers.google.com/maps/documentation/javascript/using-typescript\r\n","readmeFilename":"README.md"}