diff --git a/dist/index.html b/dist/index.html index eb2e27a4..270fbaac 100644 --- a/dist/index.html +++ b/dist/index.html @@ -36,6 +36,7 @@

Maps JSAPI Samples

  • advanced-markers-animation
  • advanced-markers-html
  • advanced-markers-html-simple
  • +
  • advanced-markers-simple
  • deckgl-heatmap
  • deckgl-kml
  • deckgl-kml-updated
  • diff --git a/dist/samples/advanced-markers-simple/app/.eslintsrc.json b/dist/samples/advanced-markers-simple/app/.eslintsrc.json new file mode 100644 index 00000000..4c44dab0 --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/.eslintsrc.json @@ -0,0 +1,13 @@ +{ + "extends": [ + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", + "rules": { + "@typescript-eslint/ban-ts-comment": 0, + "@typescript-eslint/no-this-alias": 1, + "@typescript-eslint/no-empty-function": 1, + "@typescript-eslint/explicit-module-boundary-types": 1, + "@typescript-eslint/no-unused-vars": 1 + } +} diff --git a/dist/samples/advanced-markers-simple/app/README.md b/dist/samples/advanced-markers-simple/app/README.md new file mode 100644 index 00000000..385d8923 --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/README.md @@ -0,0 +1,33 @@ +# Google Maps JavaScript Sample + +This sample is generated from @googlemaps/js-samples located at +https://github.com/googlemaps-samples/js-api-samples. + +## Setup + +### Before starting run: + +`npm i` + +### Run an example on a local web server + +First `cd` to the folder for the sample to run, then: + +`npm start` + +### Build an individual example + +From `samples/`: + +`npm run build --workspace=sample-name/` + +### Build all of the examples. + +From `samples/`: + +`npm run build-all` + +## Feedback + +For feedback related to this sample, please open a new issue on +[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues). diff --git a/dist/samples/advanced-markers-simple/app/index.html b/dist/samples/advanced-markers-simple/app/index.html new file mode 100644 index 00000000..95330d1e --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/index.html @@ -0,0 +1,23 @@ + + + + + + Default Advanced Marker + + + + + +
    + + + + + + diff --git a/dist/samples/advanced-markers-simple/app/index.ts b/dist/samples/advanced-markers-simple/app/index.ts new file mode 100644 index 00000000..29439274 --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/index.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +// [START maps_advanced_markers_simple] +// [START maps_advanced_markers_simple_snippet] +async function initMap() { + // Request needed libraries. + const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary; + const { AdvancedMarkerElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary; + + const map = new Map(document.getElementById('map') as HTMLElement, { + center: { lat: 37.4239163, lng: -122.0947209 }, + zoom: 14, + mapId: '4504f8b37365c3d0', + }); + + const marker = new AdvancedMarkerElement({ + map, + position: { lat: 37.4239163, lng: -122.0947209 }, + }); +} +// [END maps_advanced_markers_simple_snippet] +initMap(); +// [END maps_advanced_markers_simple] \ No newline at end of file diff --git a/dist/samples/advanced-markers-simple/app/package.json b/dist/samples/advanced-markers-simple/app/package.json new file mode 100644 index 00000000..80a5fee6 --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/package.json @@ -0,0 +1,14 @@ +{ + "name": "@js-api-samples/advanced-markers-simple", + "version": "1.0.0", + "scripts": { + "build": "tsc && bash ../jsfiddle.sh advanced-markers-simple && bash ../app.sh advanced-markers-simple && bash ../docs.sh advanced-markers-simple && npm run build:vite --workspace=. && bash ../dist.sh advanced-markers-simple", + "test": "tsc && npm run build:vite --workspace=.", + "start": "tsc && vite build --base './' && vite", + "build:vite": "vite build --base './'", + "preview": "vite preview" + }, + "dependencies": { + + } +} diff --git a/dist/samples/advanced-markers-simple/app/style.css b/dist/samples/advanced-markers-simple/app/style.css new file mode 100644 index 00000000..0cc9310b --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/style.css @@ -0,0 +1,25 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +/* [START maps_advanced_markers_simple] */ +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +/* [END maps_advanced_markers_simple] */ \ No newline at end of file diff --git a/dist/samples/advanced-markers-simple/app/tsconfig.json b/dist/samples/advanced-markers-simple/app/tsconfig.json new file mode 100644 index 00000000..366aabb0 --- /dev/null +++ b/dist/samples/advanced-markers-simple/app/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "esnext", + "target": "esnext", + "strict": true, + "noImplicitAny": false, + "lib": [ + "es2015", + "esnext", + "es6", + "dom", + "dom.iterable" + ], + "moduleResolution": "Node", + "jsx": "preserve" + } +} diff --git a/dist/samples/advanced-markers-simple/dist/assets/index-ClNHZjac.js b/dist/samples/advanced-markers-simple/dist/assets/index-ClNHZjac.js new file mode 100644 index 00000000..fec5a932 --- /dev/null +++ b/dist/samples/advanced-markers-simple/dist/assets/index-ClNHZjac.js @@ -0,0 +1,5 @@ +(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))s(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&s(n)}).observe(document,{childList:!0,subtree:!0});function o(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function s(e){if(e.ep)return;e.ep=!0;const t=o(e);fetch(e.href,t)}})();/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */async function c(){const{Map:i}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:r}=await google.maps.importLibrary("marker"),o=new i(document.getElementById("map"),{center:{lat:37.4239163,lng:-122.0947209},zoom:14,mapId:"4504f8b37365c3d0"});new r({map:o,position:{lat:37.4239163,lng:-122.0947209}})}c(); diff --git a/dist/samples/advanced-markers-simple/dist/assets/index-DW_Ml_OD.css b/dist/samples/advanced-markers-simple/dist/assets/index-DW_Ml_OD.css new file mode 100644 index 00000000..672cb7cc --- /dev/null +++ b/dist/samples/advanced-markers-simple/dist/assets/index-DW_Ml_OD.css @@ -0,0 +1,5 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */#map{height:100%}html,body{height:100%;margin:0;padding:0} diff --git a/dist/samples/advanced-markers-simple/dist/index.html b/dist/samples/advanced-markers-simple/dist/index.html new file mode 100644 index 00000000..95de7cbd --- /dev/null +++ b/dist/samples/advanced-markers-simple/dist/index.html @@ -0,0 +1,23 @@ + + + + + + Default Advanced Marker + + + + + +
    + + + + + + diff --git a/dist/samples/advanced-markers-simple/docs/index.html b/dist/samples/advanced-markers-simple/docs/index.html new file mode 100644 index 00000000..95330d1e --- /dev/null +++ b/dist/samples/advanced-markers-simple/docs/index.html @@ -0,0 +1,23 @@ + + + + + + Default Advanced Marker + + + + + +
    + + + + + + diff --git a/dist/samples/advanced-markers-simple/docs/index.js b/dist/samples/advanced-markers-simple/docs/index.js new file mode 100644 index 00000000..435c8604 --- /dev/null +++ b/dist/samples/advanced-markers-simple/docs/index.js @@ -0,0 +1,25 @@ +"use strict"; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +// [START maps_advanced_markers_simple] +// [START maps_advanced_markers_simple_snippet] +async function initMap() { + // Request needed libraries. + const { Map } = await google.maps.importLibrary("maps"); + const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); + const map = new Map(document.getElementById('map'), { + center: { lat: 37.4239163, lng: -122.0947209 }, + zoom: 14, + mapId: '4504f8b37365c3d0', + }); + const marker = new AdvancedMarkerElement({ + map, + position: { lat: 37.4239163, lng: -122.0947209 }, + }); +} +// [END maps_advanced_markers_simple_snippet] +initMap(); +// [END maps_advanced_markers_simple] diff --git a/dist/samples/advanced-markers-simple/docs/index.ts b/dist/samples/advanced-markers-simple/docs/index.ts new file mode 100644 index 00000000..29439274 --- /dev/null +++ b/dist/samples/advanced-markers-simple/docs/index.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +// [START maps_advanced_markers_simple] +// [START maps_advanced_markers_simple_snippet] +async function initMap() { + // Request needed libraries. + const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary; + const { AdvancedMarkerElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary; + + const map = new Map(document.getElementById('map') as HTMLElement, { + center: { lat: 37.4239163, lng: -122.0947209 }, + zoom: 14, + mapId: '4504f8b37365c3d0', + }); + + const marker = new AdvancedMarkerElement({ + map, + position: { lat: 37.4239163, lng: -122.0947209 }, + }); +} +// [END maps_advanced_markers_simple_snippet] +initMap(); +// [END maps_advanced_markers_simple] \ No newline at end of file diff --git a/dist/samples/advanced-markers-simple/docs/style.css b/dist/samples/advanced-markers-simple/docs/style.css new file mode 100644 index 00000000..0cc9310b --- /dev/null +++ b/dist/samples/advanced-markers-simple/docs/style.css @@ -0,0 +1,25 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +/* [START maps_advanced_markers_simple] */ +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +/* [END maps_advanced_markers_simple] */ \ No newline at end of file diff --git a/dist/samples/advanced-markers-simple/jsfiddle/demo.css b/dist/samples/advanced-markers-simple/jsfiddle/demo.css new file mode 100644 index 00000000..fa4d8cd3 --- /dev/null +++ b/dist/samples/advanced-markers-simple/jsfiddle/demo.css @@ -0,0 +1,24 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + diff --git a/dist/samples/advanced-markers-simple/jsfiddle/demo.details b/dist/samples/advanced-markers-simple/jsfiddle/demo.details new file mode 100644 index 00000000..e3acc5c3 --- /dev/null +++ b/dist/samples/advanced-markers-simple/jsfiddle/demo.details @@ -0,0 +1,7 @@ +name: advanced-markers-simple +authors: + - Geo Developer IX Documentation Team +tags: + - google maps +load_type: h +description: Sample code supporting Google Maps Platform JavaScript API documentation. diff --git a/dist/samples/advanced-markers-simple/jsfiddle/demo.html b/dist/samples/advanced-markers-simple/jsfiddle/demo.html new file mode 100644 index 00000000..514e4140 --- /dev/null +++ b/dist/samples/advanced-markers-simple/jsfiddle/demo.html @@ -0,0 +1,23 @@ + + + + + + Default Advanced Marker + + + + + +
    + + + + + + diff --git a/dist/samples/advanced-markers-simple/jsfiddle/demo.js b/dist/samples/advanced-markers-simple/jsfiddle/demo.js new file mode 100644 index 00000000..e5609cef --- /dev/null +++ b/dist/samples/advanced-markers-simple/jsfiddle/demo.js @@ -0,0 +1,25 @@ +"use strict"; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + + +async function initMap() { + // Request needed libraries. + const { Map } = await google.maps.importLibrary("maps"); + const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); + const map = new Map(document.getElementById('map'), { + center: { lat: 37.4239163, lng: -122.0947209 }, + zoom: 14, + mapId: '4504f8b37365c3d0', + }); + const marker = new AdvancedMarkerElement({ + map, + position: { lat: 37.4239163, lng: -122.0947209 }, + }); +} + +initMap(); +