Skip to content

Commit 71bb35a

Browse files
Update dist folder [skip ci] (#903)
1 parent d8d14fc commit 71bb35a

Some content is hidden

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

84 files changed

+560
-619
lines changed

dist/samples/advanced-markers-basic-style/app/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111

1212
<link rel="stylesheet" type="text/css" href="./style.css" />
1313
<script type="module" src="./index.js"></script>
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1814
<!-- prettier-ignore -->
1915
<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))})
2016
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
17+
</head>
18+
<body>
19+
<gmp-map center="37.419,-122.02" zoom="14" map-id="4504f8b37365c3d0"></gmp-map>
2120
</body>
2221
</html>
2322
<!-- [END maps_advanced_markers_basic_style] -->

dist/samples/advanced-markers-basic-style/app/index.ts

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,75 +6,70 @@
66

77
// [START maps_advanced_markers_basic_style]
88
const parser = new DOMParser();
9+
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;
910

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

15-
const map = new Map(document.getElementById('map') as HTMLElement, {
16-
center: { lat: 37.419, lng: -122.02 },
17-
zoom: 14,
18-
mapId: '4504f8b37365c3d0',
19-
});
20-
21-
// Each PinElement is paired with a MarkerView to demonstrate setting each parameter.
16+
// Each PinElement is paired with a marker to demonstrate setting each parameter.
2217

2318
// [START maps_advanced_markers_basic_style_title]
2419
// Default marker with title text (no PinElement).
25-
const markerViewWithText = new AdvancedMarkerElement({
26-
map,
20+
const markerWithText = new AdvancedMarkerElement({
2721
position: { lat: 37.419, lng: -122.03 },
2822
title: 'Title text for the marker at lat: 37.419, lng: -122.03',
2923
});
24+
mapElement.append(markerWithText);
3025
// [END maps_advanced_markers_basic_style_title]
3126

3227
// [START maps_advanced_markers_basic_style_scale]
3328
// Adjust the scale.
3429
const pinScaled = new PinElement({
3530
scale: 1.5,
3631
});
37-
const markerViewScaled = new AdvancedMarkerElement({
38-
map,
32+
const markerScaled = new AdvancedMarkerElement({
3933
position: { lat: 37.419, lng: -122.02 },
40-
content: pinScaled.element,
4134
});
35+
markerScaled.append(pinScaled);
36+
mapElement.append(markerScaled);
4237
// [END maps_advanced_markers_basic_style_scale]
4338

4439
// [START maps_advanced_markers_basic_style_background]
4540
// Change the background color.
4641
const pinBackground = new PinElement({
4742
background: '#FBBC04',
4843
});
49-
const markerViewBackground = new AdvancedMarkerElement({
50-
map,
44+
const markerBackground = new AdvancedMarkerElement({
5145
position: { lat: 37.419, lng: -122.01 },
52-
content: pinBackground.element,
5346
});
47+
markerBackground.append(pinBackground);
48+
mapElement.append(markerBackground);
5449
// [END maps_advanced_markers_basic_style_background]
5550

5651
// [START maps_advanced_markers_basic_style_border]
5752
// Change the border color.
5853
const pinBorder = new PinElement({
5954
borderColor: '#137333',
6055
});
61-
const markerViewBorder = new AdvancedMarkerElement({
62-
map,
56+
const markerBorder = new AdvancedMarkerElement({
6357
position: { lat: 37.415, lng: -122.035 },
64-
content: pinBorder.element,
6558
});
59+
markerBorder.append(pinBorder);
60+
mapElement.append(markerBorder);
6661
// [END maps_advanced_markers_basic_style_border]
6762

6863
// [START maps_advanced_markers_basic_style_glyph]
6964
// Change the glyph color.
7065
const pinGlyph = new PinElement({
7166
glyphColor: 'white',
7267
});
73-
const markerViewGlyph = new AdvancedMarkerElement({
74-
map,
68+
const markerGlyph = new AdvancedMarkerElement({
7569
position: { lat: 37.415, lng: -122.025 },
76-
content: pinGlyph.element,
7770
});
71+
markerGlyph.append(pinGlyph);
72+
mapElement.append(markerGlyph);
7873
// [END maps_advanced_markers_basic_style_glyph]
7974

8075
// [START maps_advanced_markers_basic_style_text_glyph]
@@ -83,11 +78,11 @@ async function initMap() {
8378
glyphText: 'T',
8479
glyphColor: 'white',
8580
});
86-
const markerViewGlyphText = new AdvancedMarkerElement({
87-
map,
81+
const markerGlyphText = new AdvancedMarkerElement({
8882
position: { lat: 37.415, lng: -122.015 },
89-
content: pinTextGlyph.element,
9083
});
84+
markerGlyphText.append(pinTextGlyph);
85+
mapElement.append(markerGlyphText);
9186
// [END maps_advanced_markers_basic_style_text_glyph]
9287

9388
// [START maps_advanced_markers_basic_style_hide_glyph]
@@ -96,14 +91,14 @@ async function initMap() {
9691
//@ts-ignore
9792
glyphText: '',
9893
});
99-
const markerViewNoGlyph = new AdvancedMarkerElement({
100-
map,
94+
const markerNoGlyph = new AdvancedMarkerElement({
10195
position: { lat: 37.415, lng: -122.005 },
102-
content: pinNoGlyph.element,
10396
});
97+
markerNoGlyph.append(pinNoGlyph);
98+
mapElement.append(markerNoGlyph);
10499
// [END maps_advanced_markers_basic_style_hide_glyph]
105100

106101
}
107102

108103
initMap();
109-
// [END maps_advanced_markers_basic_style]
104+
// [END maps_advanced_markers_basic_style]

dist/samples/advanced-markers-basic-style/app/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Always set the map height explicitly to define the size of the div element
99
* that contains the map.
1010
*/
11-
#map {
11+
gmp-map {
1212
height: 100%;
1313
}
1414

dist/samples/advanced-markers-basic-style/dist/assets/index-B9CtUwB1.js

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

dist/samples/advanced-markers-draggable/dist/assets/index-DW_Ml_OD.css renamed to dist/samples/advanced-markers-basic-style/dist/assets/index-BOPY9jPg.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
* @license
33
* Copyright 2019 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
5-
*/#map{height:100%}html,body{height:100%;margin:0;padding:0}
5+
*/gmp-map{height:100%}html,body{height:100%;margin:0;padding:0}

dist/samples/advanced-markers-basic-style/dist/assets/index-DFenx6lm.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

dist/samples/advanced-markers-basic-style/dist/index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
<head>
1010
<title>Advanced Marker Basic Customization</title>
1111

12-
<script type="module" crossorigin src="./assets/index-DFenx6lm.js"></script>
13-
<link rel="stylesheet" crossorigin href="./assets/index-DW_Ml_OD.css">
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1812
<!-- prettier-ignore -->
1913
<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))})
2014
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
15+
<script type="module" crossorigin src="./assets/index-B9CtUwB1.js"></script>
16+
<link rel="stylesheet" crossorigin href="./assets/index-BOPY9jPg.css">
17+
</head>
18+
<body>
19+
<gmp-map center="37.419,-122.02" zoom="14" map-id="4504f8b37365c3d0"></gmp-map>
2120
</body>
2221
</html>
2322
<!-- [END maps_advanced_markers_basic_style] -->

dist/samples/advanced-markers-basic-style/docs/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111

1212
<link rel="stylesheet" type="text/css" href="./style.css" />
1313
<script type="module" src="./index.js"></script>
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1814
<!-- prettier-ignore -->
1915
<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))})
2016
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
17+
</head>
18+
<body>
19+
<gmp-map center="37.419,-122.02" zoom="14" map-id="4504f8b37365c3d0"></gmp-map>
2120
</body>
2221
</html>
2322
<!-- [END maps_advanced_markers_basic_style] -->

dist/samples/advanced-markers-basic-style/docs/index.js

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,91 +6,87 @@
66
*/
77
// [START maps_advanced_markers_basic_style]
88
const parser = new DOMParser();
9+
const mapElement = document.querySelector('gmp-map');
910
async function initMap() {
1011
// Request needed libraries.
1112
const { Map } = await google.maps.importLibrary("maps");
1213
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker");
13-
const map = new Map(document.getElementById('map'), {
14-
center: { lat: 37.419, lng: -122.02 },
15-
zoom: 14,
16-
mapId: '4504f8b37365c3d0',
17-
});
18-
// Each PinElement is paired with a MarkerView to demonstrate setting each parameter.
14+
// Each PinElement is paired with a marker to demonstrate setting each parameter.
1915
// [START maps_advanced_markers_basic_style_title]
2016
// Default marker with title text (no PinElement).
21-
const markerViewWithText = new AdvancedMarkerElement({
22-
map,
17+
const markerWithText = new AdvancedMarkerElement({
2318
position: { lat: 37.419, lng: -122.03 },
2419
title: 'Title text for the marker at lat: 37.419, lng: -122.03',
2520
});
21+
mapElement.append(markerWithText);
2622
// [END maps_advanced_markers_basic_style_title]
2723
// [START maps_advanced_markers_basic_style_scale]
2824
// Adjust the scale.
2925
const pinScaled = new PinElement({
3026
scale: 1.5,
3127
});
32-
const markerViewScaled = new AdvancedMarkerElement({
33-
map,
28+
const markerScaled = new AdvancedMarkerElement({
3429
position: { lat: 37.419, lng: -122.02 },
35-
content: pinScaled.element,
3630
});
31+
markerScaled.append(pinScaled);
32+
mapElement.append(markerScaled);
3733
// [END maps_advanced_markers_basic_style_scale]
3834
// [START maps_advanced_markers_basic_style_background]
3935
// Change the background color.
4036
const pinBackground = new PinElement({
4137
background: '#FBBC04',
4238
});
43-
const markerViewBackground = new AdvancedMarkerElement({
44-
map,
39+
const markerBackground = new AdvancedMarkerElement({
4540
position: { lat: 37.419, lng: -122.01 },
46-
content: pinBackground.element,
4741
});
42+
markerBackground.append(pinBackground);
43+
mapElement.append(markerBackground);
4844
// [END maps_advanced_markers_basic_style_background]
4945
// [START maps_advanced_markers_basic_style_border]
5046
// Change the border color.
5147
const pinBorder = new PinElement({
5248
borderColor: '#137333',
5349
});
54-
const markerViewBorder = new AdvancedMarkerElement({
55-
map,
50+
const markerBorder = new AdvancedMarkerElement({
5651
position: { lat: 37.415, lng: -122.035 },
57-
content: pinBorder.element,
5852
});
53+
markerBorder.append(pinBorder);
54+
mapElement.append(markerBorder);
5955
// [END maps_advanced_markers_basic_style_border]
6056
// [START maps_advanced_markers_basic_style_glyph]
6157
// Change the glyph color.
6258
const pinGlyph = new PinElement({
6359
glyphColor: 'white',
6460
});
65-
const markerViewGlyph = new AdvancedMarkerElement({
66-
map,
61+
const markerGlyph = new AdvancedMarkerElement({
6762
position: { lat: 37.415, lng: -122.025 },
68-
content: pinGlyph.element,
6963
});
64+
markerGlyph.append(pinGlyph);
65+
mapElement.append(markerGlyph);
7066
// [END maps_advanced_markers_basic_style_glyph]
7167
// [START maps_advanced_markers_basic_style_text_glyph]
7268
const pinTextGlyph = new PinElement({
7369
//@ts-ignore
7470
glyphText: 'T',
7571
glyphColor: 'white',
7672
});
77-
const markerViewGlyphText = new AdvancedMarkerElement({
78-
map,
73+
const markerGlyphText = new AdvancedMarkerElement({
7974
position: { lat: 37.415, lng: -122.015 },
80-
content: pinTextGlyph.element,
8175
});
76+
markerGlyphText.append(pinTextGlyph);
77+
mapElement.append(markerGlyphText);
8278
// [END maps_advanced_markers_basic_style_text_glyph]
8379
// [START maps_advanced_markers_basic_style_hide_glyph]
8480
// Hide the glyph.
8581
const pinNoGlyph = new PinElement({
8682
//@ts-ignore
8783
glyphText: '',
8884
});
89-
const markerViewNoGlyph = new AdvancedMarkerElement({
90-
map,
85+
const markerNoGlyph = new AdvancedMarkerElement({
9186
position: { lat: 37.415, lng: -122.005 },
92-
content: pinNoGlyph.element,
9387
});
88+
markerNoGlyph.append(pinNoGlyph);
89+
mapElement.append(markerNoGlyph);
9490
// [END maps_advanced_markers_basic_style_hide_glyph]
9591
}
9692
initMap();

0 commit comments

Comments
 (0)