Skip to content

Commit fd7235b

Browse files
Update dist folder [skip ci] (#939)
1 parent 72a7cb4 commit fd7235b

File tree

21 files changed

+371
-0
lines changed

21 files changed

+371
-0
lines changed

dist/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ <h1>Maps JSAPI Samples</h1>
9494
<li><a href='/samples/ui-kit-place-search-text-compact/dist'>ui-kit-place-search-text-compact</a></li>
9595
<li><a href='/samples/weather-api-current-compact/dist'>weather-api-current-compact</a></li>
9696
<li><a href='/samples/web-components-map/dist'>web-components-map</a></li>
97+
<li><a href='/samples/web-components-markers/dist'>web-components-markers</a></li>
9798
</ul>
9899
</body>
99100
</html>
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Google Maps JavaScript Sample
2+
3+
## web-components-markers
4+
5+
Add a marker to a Google map using web components.
6+
7+
## Setup
8+
9+
### Before starting run:
10+
11+
`npm i`
12+
13+
### Run an example on a local web server
14+
15+
`cd samples/web-components-markers`
16+
`npm start`
17+
18+
### Build an individual example
19+
20+
`cd samples/web-components-markers`
21+
`npm run build`
22+
23+
From 'samples':
24+
25+
`npm run build --workspace=web-components-markers/`
26+
27+
### Build all of the examples.
28+
29+
From 'samples':
30+
31+
`npm run build-all`
32+
33+
### Run lint to check for problems
34+
35+
`cd samples/web-components-markers`
36+
`npx eslint index.ts`
37+
38+
## Feedback
39+
40+
For feedback related to this sample, please open a new issue on
41+
[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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_web_components_markers] -->
8+
<html>
9+
<head>
10+
<title>Add a Map with Markers using HTML</title>
11+
12+
<link rel="stylesheet" type="text/css" href="./style.css" />
13+
<script type="module" src="./index.js"></script>
14+
<script
15+
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps,marker&v=weekly"
16+
defer
17+
></script>
18+
</head>
19+
<body>
20+
<!-- [START maps_web_components_markers_div] -->
21+
<gmp-map
22+
center="41.027748173921374, -92.41852445367961"
23+
zoom="13"
24+
map-id="DEMO_MAP_ID"
25+
>
26+
<gmp-advanced-marker
27+
position="41.027748173921374, -92.41852445367961"
28+
title="Ottumwa, IA"
29+
></gmp-advanced-marker>
30+
</gmp-map>
31+
<!-- [END maps_web_components_markers_div] -->
32+
</body>
33+
</html>
34+
<!-- [END maps_web_components_markers] -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
// [START maps_web_components_markers]
8+
// This example adds a map with markers, using web components.
9+
// [START maps_web_components_markers_initmap]
10+
async function initMap() {
11+
console.log('Maps JavaScript API loaded.');
12+
}
13+
// [END maps_web_components_markers_initmap]
14+
initMap();
15+
// [END maps_web_components_markers]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@js-api-samples/web-components-markers",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"build": "tsc && bash ../jsfiddle.sh web-components-markers && bash ../app.sh web-components-markers && bash ../docs.sh web-components-markers && npm run build:vite --workspace=. && bash ../dist.sh web-components-markers",
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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/* [START maps_web_components_markers] */
7+
/*
8+
* Always set the map height explicitly to define the size of the div element
9+
* that contains the map.
10+
*/
11+
gmp-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+
/* [END maps_web_components_markers] */
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{height:100%}html,body{height:100%;margin:0;padding:0}

dist/samples/web-components-markers/dist/assets/index-Botgir2q.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)