Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
contents: write
id-token: write
env:
GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}"
GOOGLE_MAPS_API_KEY: "${{ secrets.GOOGLE_MAPS_API_KEY }}"
steps:
- name: Checkout main
uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ on:

env:
SKIP_DIST: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}
GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
done
env:
STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES: ${{ steps.get_workspaces.outputs.changed_workspaces }}
GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}"

- name: Generate Index (Run Once After Builds)
run: bash samples/generate-index.sh
Expand All @@ -151,6 +153,7 @@ jobs:
# Pass the correct base reference for find-changes.sh when called by samples.spec.ts
GIT_BASE_REF: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }}
CI: true
GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}"

- name: Upload Test Report Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -203,6 +206,8 @@ jobs:

- name: Build All Projects
run: npm run build-all
env:
GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}"

- name: Generate Index (Run Once After Full Builds)
run: bash samples/generate-index.sh
Expand All @@ -216,6 +221,7 @@ jobs:
env:
CI: true
TEST_ALL_SAMPLES: "true"
GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}"

- name: Upload Test Report Artifact
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ samples/.env
# Ignore dist files generated by build.
samples/*/dist/
samples/*/*.js
!samples/*/vite.config.js

# Ignore playwright outputs
/test-results/
Expand Down
7 changes: 3 additions & 4 deletions e2e/samples.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,14 @@
// START run the preview
// Get an available port
const port = 8080;
const url = `http://localhost:${port}/`;
const url = `http://localhost:${port}/samples/${sampleFolder}/dist/`;

Check warning on line 149 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "8080" of template literal expression

Check warning on line 149 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "8080" of template literal expression

const viteProcess = childProcess.spawn(
'vite',
['preview', `--port=${port}`],

Check warning on line 153 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "8080" of template literal expression

Check warning on line 153 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "8080" of template literal expression
{
cwd: path.join(samplesDir, sampleFolder),
stdio: 'inherit',
detached: true, // Allows parent to exit independently, though we kill it in finally
}
);

Expand Down Expand Up @@ -213,7 +212,7 @@
// Wait for Google Maps to load.
await page.waitForFunction(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
() => (window as any).google?.maps,

Check warning on line 215 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value

Check warning on line 215 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value
{ timeout: 500 }
);

Expand All @@ -225,9 +224,9 @@
const hasGoogleMaps = await page.evaluate(() => {
return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
typeof (window as any).google !== 'undefined' &&

Check warning on line 227 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value

Check warning on line 227 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value
// eslint-disable-next-line @typescript-eslint/no-explicit-any
typeof (window as any).google.maps !== 'undefined'

Check warning on line 229 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value

Check warning on line 229 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access .google on an `any` value
);
});
expect(hasGoogleMaps).toBeTruthy();
Expand All @@ -247,13 +246,13 @@
process.kill(viteProcess.pid, 'SIGINT');
} catch (error) {
console.warn(
`Failed to kill Vite process for ${sampleFolder} (PID: ${viteProcess.pid}):`,

Check warning on line 249 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "number" of template literal expression

Check warning on line 249 in e2e/samples.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type "number" of template literal expression
error
);
}
}
// Add a small delay to allow the process to terminate
await page.waitForTimeout(500);
// Add a small delay to allow the process to terminate without depending on the potentially closed page object
await new Promise((resolve) => setTimeout(resolve, 500));
}
});
});
2 changes: 1 addition & 1 deletion samples/3d-accessibility-features/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-accessibility-features/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-camera-boundary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-camera-boundary/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-camera-center/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-camera-center/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-camera-position/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions samples/3d-camera-position/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
// [START maps_3d_camera_position]
async function initMap(): Promise<void> {
async function init(): Promise<void> {
// Declare the needed libraries.
await google.maps.importLibrary('maps3d');

Expand Down Expand Up @@ -68,7 +68,7 @@
lngSlider.value = lng;
altitudeVal.textContent = alt;

codeElem.textContent = `<gmp-map-3d center="${lat},${lng},${alt}" mode="${mode}" tilt="${tilt}" range="${range}" heading="${heading}" fov="${fov}" roll="${roll}"></gmp-map-3d>`;

Check warning on line 71 in samples/3d-camera-position/index.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type ""HYBRID" | "ROADMAP" | "SATELLITE" | null" of template literal expression

Check warning on line 71 in samples/3d-camera-position/index.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Invalid type ""HYBRID" | "ROADMAP" | "SATELLITE" | null" of template literal expression
}
};

Expand Down Expand Up @@ -126,7 +126,7 @@
map3DElement.fov = Math.min(80, Math.max(5, val));
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(map3DElement as any)[prop] = val;

Check warning on line 129 in samples/3d-camera-position/index.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access [prop] on an `any` value

Check warning on line 129 in samples/3d-camera-position/index.ts

View workflow job for this annotation

GitHub Actions / Playwright PR/Push Tests

Unsafe member access [prop] on an `any` value
}
updateUI();
});
Expand All @@ -148,5 +148,5 @@
setTimeout(updateUI, 500);
}

void initMap();
void init();
// [END maps_3d_camera_position]
5 changes: 2 additions & 3 deletions samples/3d-camera-position/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"name": "@js-api-samples/3d-camera-position",
"version": "1.0.0",
"scripts": {
"build": "tsc && bash ../jsfiddle.sh 3d-camera-position && bash ../app.sh 3d-camera-position && bash ../docs.sh 3d-camera-position && npm run build:vite --workspace=. && bash ../dist.sh 3d-camera-position",
"build": "bash ../build-single.sh",
"test": "tsc && npm run build:vite --workspace=.",
"start": "tsc && vite build --base './' && vite",
"build:vite": "vite build --base './'",
"preview": "vite preview"
},
"dependencies": {}
}
}
1 change: 1 addition & 0 deletions samples/3d-camera-position/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-camera-to-around/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-camera-to-around/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-clamp-mode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-clamp-mode/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-coverage-map/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-coverage-map/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-hero-showcase/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-hero-showcase/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-label-toggle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-label-toggle/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-localization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-localization/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-map-45-degree-locked/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script type="module" src="./index.js"></script>
<script
async
src="https://maps.googleapis.com/maps/api/js?loading=async&key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps3d"></script>
src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps3d"></script>
</head>
<body>
<gmp-map-3d
Expand Down
1 change: 1 addition & 0 deletions samples/3d-map-45-degree-locked/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-map-45-degree/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-map-45-degree/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-map-events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-map-events/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-map-roadmap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8",
key: "GOOGLE_MAPS_API_KEY",
v: "alpha"
});
</script>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-map-roadmap/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-map-styling/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-map-styling/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-marker-click-event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-marker-click-event/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
2 changes: 1 addition & 1 deletion samples/3d-marker-collision-behavior/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
// prettier-ignore
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8"
key: "GOOGLE_MAPS_API_KEY"
});
</script>
</head>
Expand Down
1 change: 1 addition & 0 deletions samples/3d-marker-collision-behavior/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../../vite.config.js';
Loading
Loading