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
9 changes: 4 additions & 5 deletions dist/samples/advanced-markers-altitude/app/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
@license
Copyright 2019 Google LLC. All Rights Reserved.
Expand All @@ -11,13 +11,12 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<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))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map center="47.65196191658531,-122.30716770065949" zoom="19" map-id="6ff586e93e18149f"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_altitude] -->
20 changes: 10 additions & 10 deletions dist/samples/advanced-markers-altitude/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_advanced_markers_altitude]
let map;
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;

async function initMap() {
// Request needed libraries.
const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary;

map = new Map(document.getElementById('map') as HTMLElement, {
center: {lat: 47.65196191658531, lng: -122.30716770065949},
zoom: 19,
mapElement.innerMap.setOptions ({
tilt: 67.5,
heading: 45,
mapId: '6ff586e93e18149f',
});

// [START maps_advanced_markers_altitude_marker]
const pin = new PinElement({
background: '#4b2e83',
Expand All @@ -26,14 +25,15 @@ async function initMap() {
scale: 2.0,
});

const markerView = new AdvancedMarkerElement({
map,
content: pin.element,
const marker = new AdvancedMarkerElement({
// Set altitude to 20 meters above the ground.
position: { lat: 47.65170843460547, lng: -122.30754, altitude: 20 } as google.maps.LatLngAltitudeLiteral,
});
marker.append(pin);

mapElement.append(marker);
// [END maps_advanced_markers_altitude_marker]
}

initMap();
// [END maps_advanced_markers_altitude]
// [END maps_advanced_markers_altitude]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions dist/samples/advanced-markers-altitude/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
@license
Copyright 2019 Google LLC. All Rights Reserved.
Expand All @@ -9,15 +9,14 @@
<head>
<title>Advanced Marker Altitude</title>

<script type="module" crossorigin src="./assets/index-spGOiCKz.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DW_Ml_OD.css">
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<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))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
<script type="module" crossorigin src="./assets/index-B5Lk-3V4.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DW_Ml_OD.css">
</head>
<body>
<gmp-map center="47.65196191658531,-122.30716770065949" zoom="19" map-id="6ff586e93e18149f"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_altitude] -->
9 changes: 4 additions & 5 deletions dist/samples/advanced-markers-altitude/docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
@license
Copyright 2019 Google LLC. All Rights Reserved.
Expand All @@ -11,13 +11,12 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<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))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map center="47.65196191658531,-122.30716770065949" zoom="19" map-id="6ff586e93e18149f"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_altitude] -->
15 changes: 6 additions & 9 deletions dist/samples/advanced-markers-altitude/docs/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
"use strict";
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// [START maps_advanced_markers_altitude]
let map;
const mapElement = document.querySelector('gmp-map');
async function initMap() {
// Request needed libraries.
const { Map } = await google.maps.importLibrary("maps");
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker");
map = new Map(document.getElementById('map'), {
center: { lat: 47.65196191658531, lng: -122.30716770065949 },
zoom: 19,
mapElement.innerMap.setOptions({
tilt: 67.5,
heading: 45,
mapId: '6ff586e93e18149f',
});
// [START maps_advanced_markers_altitude_marker]
const pin = new PinElement({
Expand All @@ -24,12 +21,12 @@ async function initMap() {
glyphColor: '#b7a57a',
scale: 2.0,
});
const markerView = new AdvancedMarkerElement({
map,
content: pin.element,
const marker = new AdvancedMarkerElement({
// Set altitude to 20 meters above the ground.
position: { lat: 47.65170843460547, lng: -122.30754, altitude: 20 },
});
marker.append(pin);
mapElement.append(marker);
// [END maps_advanced_markers_altitude_marker]
}
initMap();
Expand Down
20 changes: 10 additions & 10 deletions dist/samples/advanced-markers-altitude/docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_advanced_markers_altitude]
let map;
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;

async function initMap() {
// Request needed libraries.
const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary;

map = new Map(document.getElementById('map') as HTMLElement, {
center: {lat: 47.65196191658531, lng: -122.30716770065949},
zoom: 19,
mapElement.innerMap.setOptions ({
tilt: 67.5,
heading: 45,
mapId: '6ff586e93e18149f',
});

// [START maps_advanced_markers_altitude_marker]
const pin = new PinElement({
background: '#4b2e83',
Expand All @@ -26,14 +25,15 @@ async function initMap() {
scale: 2.0,
});

const markerView = new AdvancedMarkerElement({
map,
content: pin.element,
const marker = new AdvancedMarkerElement({
// Set altitude to 20 meters above the ground.
position: { lat: 47.65170843460547, lng: -122.30754, altitude: 20 } as google.maps.LatLngAltitudeLiteral,
});
marker.append(pin);

mapElement.append(marker);
// [END maps_advanced_markers_altitude_marker]
}

initMap();
// [END maps_advanced_markers_altitude]
// [END maps_advanced_markers_altitude]
9 changes: 4 additions & 5 deletions dist/samples/advanced-markers-altitude/jsfiddle/demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
@license
Copyright 2019 Google LLC. All Rights Reserved.
Expand All @@ -11,13 +11,12 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<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))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map center="47.65196191658531,-122.30716770065949" zoom="19" map-id="6ff586e93e18149f"></gmp-map>
</body>
</html>

15 changes: 6 additions & 9 deletions dist/samples/advanced-markers-altitude/jsfiddle/demo.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
"use strict";
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

let map;
const mapElement = document.querySelector('gmp-map');
async function initMap() {
// Request needed libraries.
const { Map } = await google.maps.importLibrary("maps");
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker");
map = new Map(document.getElementById('map'), {
center: { lat: 47.65196191658531, lng: -122.30716770065949 },
zoom: 19,
mapElement.innerMap.setOptions({
tilt: 67.5,
heading: 45,
mapId: '6ff586e93e18149f',
});

const pin = new PinElement({
Expand All @@ -24,12 +21,12 @@ async function initMap() {
glyphColor: '#b7a57a',
scale: 2.0,
});
const markerView = new AdvancedMarkerElement({
map,
content: pin.element,
const marker = new AdvancedMarkerElement({
// Set altitude to 20 meters above the ground.
position: { lat: 47.65170843460547, lng: -122.30754, altitude: 20 },
});
marker.append(pin);
mapElement.append(marker);

}
initMap();
Expand Down