Skip to content
Merged
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
33 changes: 33 additions & 0 deletions samples/3d-map-45-degree-locked/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<!--
@license
Copyright 2026 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!-- [START maps_3d_map_45_degree_locked] -->
<html>
<head>
<title>3d map 45-degree perspective</title>
<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
<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"
});
</script>
</head>
<body>
<gmp-map-3d
id="gmp-map-3d"
center="37.789,-122.401,0"
range="2200"
tilt="45"
heading="188"
min-tilt="0"
max-tilt="45"
mode="satellite">
</gmp-map-3d>
</body>
</html>
<!-- [END maps_3d_map_45_degree_locked] -->
13 changes: 13 additions & 0 deletions samples/3d-map-45-degree-locked/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* @license
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_3d_map_45_degree_locked]
async function initMap(): Promise<void> {
await google.maps.importLibrary('maps3d');
}

void initMap();
// [END maps_3d_map_45_degree_locked]
11 changes: 11 additions & 0 deletions samples/3d-map-45-degree-locked/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@js-api-samples/3d-map-45-degree-locked",
"version": "1.0.0",
"scripts": {
"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"
}
}
13 changes: 13 additions & 0 deletions samples/3d-map-45-degree-locked/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* @license
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* [START maps_3d_map_45_degree_locked] */
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
/* [END maps_3d_map_45_degree_locked] */
7 changes: 7 additions & 0 deletions samples/3d-map-45-degree-locked/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "."
},
"include": ["./*.ts"]
}
Loading