Skip to content

Commit d7f885c

Browse files
Update dist folder [skip ci] (#810)
1 parent 35f09d6 commit d7f885c

Some content is hidden

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

72 files changed

+7840
-14
lines changed

dist/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ <h1>Maps JSAPI Samples</h1>
4848
<li><a href='/samples/deckgl-kml/dist'>deckgl-kml</a></li>
4949
<li><a href='/samples/deckgl-kml-updated/dist'>deckgl-kml-updated</a></li>
5050
<li><a href='/samples/deckgl-polygon/dist'>deckgl-polygon</a></li>
51+
<li><a href='/samples/layer-data-quakes-red/dist'>layer-data-quakes-red</a></li>
52+
<li><a href='/samples/layer-data-quakes-simple/dist'>layer-data-quakes-simple</a></li>
5153
<li><a href='/samples/layer-data-simple/dist'>layer-data-simple</a></li>
54+
<li><a href='/samples/layer-data-style/dist'>layer-data-style</a></li>
5255
<li><a href='/samples/map-drawing-terradraw/dist'>map-drawing-terradraw</a></li>
5356
<li><a href='/samples/map-simple/dist'>map-simple</a></li>
5457
<li><a href='/samples/place-autocomplete-basic-map/dist'>place-autocomplete-basic-map</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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
`cd samples/layer-data-quakes-red`
15+
`npm start`
16+
17+
### Build an individual example
18+
19+
`cd samples/layer-data-quakes-red`
20+
`npm run build`
21+
22+
From 'samples':
23+
24+
`npm run build --workspace=layer-data-quakes-red/`
25+
26+
### Build all of the examples.
27+
28+
From 'samples':
29+
30+
`npm run build-all`
31+
32+
### Run lint to check for problems
33+
34+
`cd samples/layer-data-quakes-red`
35+
`npx eslint index.ts`
36+
37+
## Feedback
38+
39+
For feedback related to this sample, please open a new issue on
40+
[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_layer_data_quakes_red] -->
8+
<html>
9+
<head>
10+
<title>Simple Data Layer: Earthquakes</title>
11+
12+
<link rel="stylesheet" type="text/css" href="./style.css" />
13+
<script type="module" src="./index.js"></script>
14+
15+
<!-- prettier-ignore -->
16+
<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))})
17+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
18+
</head>
19+
<body>
20+
<gmp-map center="20,-160" zoom="2"></gmp-map>
21+
</body>
22+
</html>
23+
<!-- [END maps_layer_data_quakes_red] -->
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* @license
3+
* Copyright 2019 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
// [START maps_layer_data_quakes_red]
8+
let innerMap;
9+
10+
async function initMap() {
11+
(await google.maps.importLibrary("maps")) as google.maps.MapsLibrary;
12+
13+
const mapElement = document.querySelector(
14+
"gmp-map"
15+
) as google.maps.MapElement;
16+
17+
innerMap = mapElement.innerMap;
18+
19+
// Get the earthquake data (JSONP format)
20+
// This feed is a copy from the USGS feed, you can find the originals here:
21+
// http://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php
22+
const script = document.createElement("script");
23+
24+
script.setAttribute(
25+
"src",
26+
"quakes.geo.json"
27+
);
28+
29+
document.getElementsByTagName("head")[0].appendChild(script);
30+
31+
// Add a basic style.
32+
innerMap.data.setStyle((feature) => {
33+
const mag = Math.exp(parseFloat(feature.getProperty("mag") as string)) * 0.1;
34+
return /** @type {google.maps.Data.StyleOptions} */ {
35+
icon: {
36+
path: google.maps.SymbolPath.CIRCLE,
37+
scale: mag,
38+
fillColor: "#f00",
39+
fillOpacity: 0.35,
40+
strokeWeight: 0,
41+
},
42+
};
43+
});
44+
}
45+
46+
// Defines the callback function referenced in the jsonp file.
47+
function eqfeed_callback(data: any) {
48+
innerMap.data.addGeoJson(data);
49+
}
50+
51+
window.eqfeed_callback = eqfeed_callback;
52+
initMap();
53+
// [END maps_layer_data_quakes_red]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@js-api-samples/layer-data-quakes-red",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"build": "tsc && bash ../jsfiddle.sh layer-data-quakes-red && bash ../app.sh layer-data-quakes-red && bash ../docs.sh layer-data-quakes-red && npm run build:vite --workspace=. && bash ../dist.sh layer-data-quakes-red",
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_layer_data_quakes_red] */
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+
25+
/* [END maps_layer_data_quakes_red] */
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/layer-data-quakes-red/dist/assets/index-B6LvuGLW.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+
*/gmp-map{height:100%}html,body{height:100%;margin:0;padding:0}

0 commit comments

Comments
 (0)