Skip to content

Commit c08f840

Browse files
Update dist folder [skip ci]
1 parent 46febad commit c08f840

File tree

21 files changed

+341
-0
lines changed

21 files changed

+341
-0
lines changed

dist/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ <h1>Maps JSAPI Samples</h1>
1313
<li><a href='/samples/3d-clamp-mode/dist'>3d-clamp-mode</a></li>
1414
<li><a href='/samples/3d-label-toggle/dist'>3d-label-toggle</a></li>
1515
<li><a href='/samples/3d-localization/dist'>3d-localization</a></li>
16+
<li><a href='/samples/3d-map-45-degree/dist'>3d-map-45-degree</a></li>
1617
<li><a href='/samples/3d-map-styling/dist'>3d-map-styling</a></li>
1718
<li><a href='/samples/3d-marker-click-event/dist'>3d-marker-click-event</a></li>
1819
<li><a href='/samples/3d-marker-collision-behavior/dist'>3d-marker-collision-behavior</a></li>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended"
4+
],
5+
"parser": "@typescript-eslint/parser",
6+
"rules": {
7+
"@typescript-eslint/ban-ts-comment": 0,
8+
"@typescript-eslint/no-this-alias": 1,
9+
"@typescript-eslint/no-empty-function": 1,
10+
"@typescript-eslint/explicit-module-boundary-types": 1,
11+
"@typescript-eslint/no-unused-vars": 1
12+
}
13+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Google Maps JavaScript Sample
2+
3+
## 3d-map-45-degree
4+
5+
The 3d-map-45-degree sample demonstrates a map view with satellite imagery enabled, tilted at 45 degrees.
6+
7+
Follow these instructions to set up and run 3d-map-45-degree sample on your local computer.
8+
9+
## Setup
10+
11+
### Before starting run:
12+
13+
`$npm i`
14+
15+
### Run an example on a local web server
16+
17+
First `cd` to the folder for the sample to run, then:
18+
19+
`$npm start`
20+
21+
### Build an individual example
22+
23+
From `samples/`:
24+
25+
`$npm run build --workspace=3d-map-45-degree/`
26+
27+
### Build all of the examples.
28+
29+
From `samples/`:
30+
`$npm run build-all`
31+
32+
## Feedback
33+
34+
For feedback related to this sample, please open a new issue on
35+
[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<!--
3+
@license
4+
Copyright 2025 Google LLC. All Rights Reserved.
5+
SPDX-License-Identifier: Apache-2.0
6+
-->
7+
<!-- [START maps_3d_45_degree] -->
8+
<html>
9+
<head>
10+
<title>3d map 45-degree perspective</title>
11+
<link rel="stylesheet" type="text/css" href="./style.css" />
12+
<script type="module" src="./index.js"></script>
13+
<!-- prettier-ignore -->
14+
<script>(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))})
15+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly",});</script>
16+
</head>
17+
<body>
18+
<div id="map"></div>
19+
</body>
20+
</html>
21+
<!-- [END maps_3d_45_degree] -->
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* @license
3+
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
//@ts-nocheck
8+
// [START maps_3d_45_degree]
9+
async function init() {
10+
const { Map3DElement } = await google.maps.importLibrary('maps3d');
11+
const map = new Map3DElement({
12+
center: {
13+
lat: 37.789,
14+
lng: -122.401,
15+
altitude: 0,
16+
},
17+
range: 2200,
18+
tilt: 45,
19+
heading: 188,
20+
});
21+
map.mode = 'SATELLITE';
22+
document.body.append(map);
23+
}
24+
25+
init();
26+
// [END maps_3d_45_degree]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@js-api-samples/3d-map-45-degree",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"build": "tsc && bash ../jsfiddle.sh 3d-map-45-degree && bash ../app.sh 3d-map-45-degree && bash ../docs.sh 3d-map-45-degree && npm run build:vite --workspace=. && bash ../dist.sh 3d-map-45-degree",
6+
"test": "tsc && npm run build:vite --workspace=.",
7+
"start": "tsc && vite build --base './' && vite",
8+
"build:vite": "vite build --base './'",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
13+
}
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* @license
3+
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/* [START maps_3d_45_degree] */
7+
/* * Always set the map height explicitly to define the size of the div element
8+
* that contains the map.
9+
*/
10+
#gmp-map-3d {
11+
height: 100%;
12+
}
13+
html,
14+
body {
15+
height: 100%;
16+
margin: 0;
17+
padding: 0;
18+
}
19+
/* [END maps_3d_45_degree] */
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"module": "esnext",
4+
"target": "esnext",
5+
"strict": true,
6+
"noImplicitAny": false,
7+
"lib": [
8+
"es2015",
9+
"esnext",
10+
"es6",
11+
"dom",
12+
"dom.iterable"
13+
],
14+
"moduleResolution": "Node",
15+
"jsx": "preserve"
16+
}
17+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#gmp-map-3d{height:100%}html,body{height:100%;margin:0;padding:0}

dist/samples/3d-map-45-degree/dist/assets/index-DNkjCztz.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)