Skip to content

Commit e4d3eb9

Browse files
Update dist folder [skip ci] (#295)
Co-authored-by: googlemaps-bot <[email protected]>
1 parent 93f2e8a commit e4d3eb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2475
-0
lines changed

dist/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
<!-- Default top-level index for Firebase Hosting -->
88
<h1>Maps JSAPI Samples</h1>
99
<ul>
10+
<li><a href='/samples/3d-marker-customization/dist'>3d-marker-customization</a></li>
11+
<li><a href='/samples/3d-places/dist'>3d-places</a></li>
12+
<li><a href='/samples/3d-popover-location/dist'>3d-popover-location</a></li>
13+
<li><a href='/samples/3d-popover-marker/dist'>3d-popover-marker</a></li>
14+
<li><a href='/samples/3d-simple-map/dist'>3d-simple-map</a></li>
15+
<li><a href='/samples/3d-simple-marker/dist'>3d-simple-marker</a></li>
1016
<li><a href='/samples/add-map/dist'>add-map</a></li>
1117
<li><a href='/samples/advanced-markers-animation/dist'>advanced-markers-animation</a></li>
1218
<li><a href='/samples/map-simple/dist'>map-simple</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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Map</title>
5+
6+
<link rel="stylesheet" type="text/css" href="./style.css" />
7+
<script type="module" src="./index.js"></script>
8+
</head>
9+
<body>
10+
<div id="map"></div>
11+
12+
<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))})
13+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "alpha",});</script>
14+
</body>
15+
</html>
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* * https://www.apache.org/licenses/LICENSE-2.0
8+
* * Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
// @ts-nocheck
16+
// [START maps_3d_marker_customization]
17+
async function init() {
18+
const { Map3DElement, Marker3DElement } = await google.maps.importLibrary("maps3d");
19+
const { PinElement } = await google.maps.importLibrary("marker");
20+
21+
const map = new Map3DElement({
22+
center: { lat: 37.4176, lng: -122.02, altitude: 0 },
23+
tilt: 67.5,
24+
range: 7000,
25+
mode: 'HYBRID'
26+
});
27+
28+
map.mode = "SATELLITE";
29+
30+
// Change the border color.
31+
const pinBorder = new PinElement({
32+
borderColor: '#FFFFFF',
33+
});
34+
const markerWithBorder = new Marker3DElement({
35+
position: { lat: 37.415, lng: -122.035 },
36+
});
37+
markerWithBorder.append(pinBorder);
38+
39+
// Add a label.
40+
const markerWithLabel = new Marker3DElement({
41+
position: { lat: 37.419, lng: -122.03 },
42+
label: 'Simple label'
43+
});
44+
45+
// Adjust the scale.
46+
const pinScaled = new PinElement({
47+
scale: 1.5,
48+
});
49+
const markerWithScale = new Marker3DElement({
50+
position: { lat: 37.419, lng: -122.02 },
51+
});
52+
markerWithScale.append(pinScaled);
53+
54+
// Change the glyph color.
55+
const pinGlyph = new PinElement({
56+
glyphColor: 'white',
57+
});
58+
const markerWithGlyphColor = new Marker3DElement({
59+
position: { lat: 37.415, lng: -122.025 },
60+
});
61+
markerWithGlyphColor.append(pinGlyph);
62+
63+
// Change many elements together and extrude marker.
64+
const pinTextGlyph = new PinElement({
65+
background: '#F0F6FC',
66+
glyph: 'E',
67+
glyphColor: 'red',
68+
borderColor: '#0000FF',
69+
});
70+
const markerWithGlyphText = new Marker3DElement({
71+
position: { lat: 37.415, lng: -122.015, altitude: 50 },
72+
extruded: true,
73+
altitudeMode: "RELATIVE_TO_GROUND",
74+
});
75+
markerWithGlyphText.append(pinTextGlyph);
76+
77+
// Hide the glyph.
78+
const pinNoGlyph = new PinElement({
79+
glyph: '',
80+
});
81+
const markerWithNoGlyph = new Marker3DElement({
82+
position: { lat: 37.415, lng: -122.005 },
83+
});
84+
markerWithNoGlyph.append(pinNoGlyph);
85+
86+
// Change the background color.
87+
const pinBackground = new PinElement({
88+
background: '#FBBC04',
89+
});
90+
91+
const markerWithBackground = new Marker3DElement({
92+
position: { lat: 37.419, lng: -122.01 },
93+
});
94+
markerWithBackground.append(pinBackground);
95+
96+
map.append(markerWithLabel);
97+
map.append(markerWithScale);
98+
map.append(markerWithBackground);
99+
map.append(markerWithBorder);
100+
map.append(markerWithGlyphColor);
101+
map.append(markerWithGlyphText);
102+
map.append(markerWithNoGlyph);
103+
104+
document.body.append(map);
105+
}
106+
107+
init();
108+
// [END maps_3d_marker_customization]
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-marker-customization",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"build": "tsc && bash ../jsfiddle.sh 3d-marker-customization && bash ../app.sh 3d-marker-customization && bash ../docs.sh 3d-marker-customization && npm run build:vite --workspace=. && bash ../dist.sh 3d-marker-customization",
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* * https://www.apache.org/licenses/LICENSE-2.0
8+
* * Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
/* [START maps_3d_marker_customization] */
15+
/* * Always set the map height explicitly to define the size of the div element
16+
* that contains the map.
17+
*/
18+
html,
19+
map {
20+
height: 100%;
21+
}
22+
body {
23+
height: 100%;
24+
margin: 0;
25+
padding: 0;
26+
}
27+
/* [END maps_3d_marker_customization] */
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+
html,map{height:100%}body{height:100%;margin:0;padding:0}

dist/samples/3d-marker-customization/dist/assets/index-nXcaER2-.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.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Map</title>
5+
6+
<script type="module" crossorigin src="./assets/index-nXcaER2-.js"></script>
7+
<link rel="stylesheet" crossorigin href="./assets/index-BVXE32j3.css">
8+
</head>
9+
<body>
10+
<div id="map"></div>
11+
12+
<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))})
13+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "alpha",});</script>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)