Skip to content

Commit e901c93

Browse files
Update dist folder [skip ci] (#621)
1 parent f333300 commit e901c93

Some content is hidden

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

74 files changed

+2644
-0
lines changed

dist/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ <h1>Maps JSAPI Samples</h1>
3636
<li><a href='/samples/advanced-markers-accessibility/dist'>advanced-markers-accessibility</a></li>
3737
<li><a href='/samples/advanced-markers-altitude/dist'>advanced-markers-altitude</a></li>
3838
<li><a href='/samples/advanced-markers-animation/dist'>advanced-markers-animation</a></li>
39+
<li><a href='/samples/advanced-markers-basic-style/dist'>advanced-markers-basic-style</a></li>
40+
<li><a href='/samples/advanced-markers-collision/dist'>advanced-markers-collision</a></li>
41+
<li><a href='/samples/advanced-markers-draggable/dist'>advanced-markers-draggable</a></li>
42+
<li><a href='/samples/advanced-markers-graphics/dist'>advanced-markers-graphics</a></li>
3943
<li><a href='/samples/advanced-markers-html/dist'>advanced-markers-html</a></li>
4044
<li><a href='/samples/advanced-markers-html-simple/dist'>advanced-markers-html-simple</a></li>
4145
<li><a href='/samples/advanced-markers-simple/dist'>advanced-markers-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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Google Maps JavaScript Sample
2+
3+
This sample is generated from @googlemaps/js-samples located at
4+
https://github.com/googlemaps-samples/js-api-samples.
5+
6+
## Setup
7+
8+
### Before starting run:
9+
10+
`npm i`
11+
12+
### Run an example on a local web server
13+
14+
First `cd` to the folder for the sample to run, then:
15+
16+
`npm start`
17+
18+
### Build an individual example
19+
20+
From `samples/`:
21+
22+
`npm run build --workspace=sample-name/`
23+
24+
### Build all of the examples.
25+
26+
From `samples/`:
27+
28+
`npm run build-all`
29+
30+
## Feedback
31+
32+
For feedback related to this sample, please open a new issue on
33+
[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<!--
3+
@license
4+
Copyright 2019 Google LLC. All Rights Reserved.
5+
SPDX-License-Identifier: Apache-2.0
6+
-->
7+
<!-- [START maps_advanced_markers_basic_style] -->
8+
<html>
9+
<head>
10+
<title>Advanced Marker Basic Customization</title>
11+
12+
<link rel="stylesheet" type="text/css" href="./style.css" />
13+
<script type="module" src="./index.js"></script>
14+
</head>
15+
<body>
16+
<div id="map"></div>
17+
18+
<!-- prettier-ignore -->
19+
<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))})
20+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
21+
</body>
22+
</html>
23+
<!-- [END maps_advanced_markers_basic_style] -->
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/**
2+
* @license
3+
* Copyright 2019 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
// [START maps_advanced_markers_basic_style]
8+
const parser = new DOMParser();
9+
10+
async function initMap() {
11+
// Request needed libraries.
12+
const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
13+
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary;
14+
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.
22+
23+
// [START maps_advanced_markers_basic_style_title]
24+
// Default marker with title text (no PinElement).
25+
const markerViewWithText = new AdvancedMarkerElement({
26+
map,
27+
position: { lat: 37.419, lng: -122.03 },
28+
title: 'Title text for the marker at lat: 37.419, lng: -122.03',
29+
});
30+
// [END maps_advanced_markers_basic_style_title]
31+
32+
// [START maps_advanced_markers_basic_style_scale]
33+
// Adjust the scale.
34+
const pinScaled = new PinElement({
35+
scale: 1.5,
36+
});
37+
const markerViewScaled = new AdvancedMarkerElement({
38+
map,
39+
position: { lat: 37.419, lng: -122.02 },
40+
content: pinScaled.element,
41+
});
42+
// [END maps_advanced_markers_basic_style_scale]
43+
44+
// [START maps_advanced_markers_basic_style_background]
45+
// Change the background color.
46+
const pinBackground = new PinElement({
47+
background: '#FBBC04',
48+
});
49+
const markerViewBackground = new AdvancedMarkerElement({
50+
map,
51+
position: { lat: 37.419, lng: -122.01 },
52+
content: pinBackground.element,
53+
});
54+
// [END maps_advanced_markers_basic_style_background]
55+
56+
// [START maps_advanced_markers_basic_style_border]
57+
// Change the border color.
58+
const pinBorder = new PinElement({
59+
borderColor: '#137333',
60+
});
61+
const markerViewBorder = new AdvancedMarkerElement({
62+
map,
63+
position: { lat: 37.415, lng: -122.035 },
64+
content: pinBorder.element,
65+
});
66+
// [END maps_advanced_markers_basic_style_border]
67+
68+
// [START maps_advanced_markers_basic_style_glyph]
69+
// Change the glyph color.
70+
const pinGlyph = new PinElement({
71+
glyphColor: 'white',
72+
});
73+
const markerViewGlyph = new AdvancedMarkerElement({
74+
map,
75+
position: { lat: 37.415, lng: -122.025 },
76+
content: pinGlyph.element,
77+
});
78+
// [END maps_advanced_markers_basic_style_glyph]
79+
80+
// [START maps_advanced_markers_basic_style_text_glyph]
81+
const pinTextGlyph = new PinElement({
82+
glyph: 'T',
83+
glyphColor: 'white',
84+
});
85+
const markerViewGlyphText = new AdvancedMarkerElement({
86+
map,
87+
position: { lat: 37.415, lng: -122.015 },
88+
content: pinTextGlyph.element,
89+
});
90+
// [END maps_advanced_markers_basic_style_text_glyph]
91+
92+
// [START maps_advanced_markers_basic_style_hide_glyph]
93+
// Hide the glyph.
94+
const pinNoGlyph = new PinElement({
95+
glyph: '',
96+
});
97+
const markerViewNoGlyph = new AdvancedMarkerElement({
98+
map,
99+
position: { lat: 37.415, lng: -122.005 },
100+
content: pinNoGlyph.element,
101+
});
102+
// [END maps_advanced_markers_basic_style_hide_glyph]
103+
104+
}
105+
106+
initMap();
107+
// [END maps_advanced_markers_basic_style]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@js-api-samples/advanced-markers-basic-style",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"build": "tsc && bash ../jsfiddle.sh advanced-markers-basic-style && bash ../app.sh advanced-markers-basic-style && bash ../docs.sh advanced-markers-basic-style && npm run build:vite --workspace=. && bash ../dist.sh advanced-markers-basic-style",
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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @license
3+
* Copyright 2019 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/* [START maps_advanced_markers_basic_style] */
7+
/*
8+
* Always set the map height explicitly to define the size of the div element
9+
* that contains the map.
10+
*/
11+
#map {
12+
height: 100%;
13+
}
14+
15+
/*
16+
* Optional: Makes the sample page fill the window.
17+
*/
18+
html,
19+
body {
20+
height: 100%;
21+
margin: 0;
22+
padding: 0;
23+
}
24+
25+
/* [END maps_advanced_markers_basic_style] */
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+
}

dist/samples/advanced-markers-basic-style/dist/assets/index-CZt8nPGO.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.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* @license
3+
* Copyright 2019 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/#map{height:100%}html,body{height:100%;margin:0;padding:0}

0 commit comments

Comments
 (0)