Skip to content

Commit e646f53

Browse files
Update dist folder [skip ci] (#308)
Co-authored-by: googlemaps-bot <[email protected]>
1 parent 082f9cb commit e646f53

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

dist/samples/ui-kit-place-search-text/app/index.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ let marker = document.querySelector('gmp-advanced-marker') as any;
1414
let markers = {};
1515
let infoWindow;
1616
let center = { lat: 37.395641, lng: -122.077627 };
17+
let bounds;
1718

1819
async function initMap(): Promise<void> {
19-
await google.maps.importLibrary("places");
20-
const { InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
20+
const { Map, InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
2121
const { Place } = await google.maps.importLibrary("places") as google.maps.PlacesLibrary;
2222

23+
// Set bounds for location restriction.
24+
bounds = new google.maps.LatLngBounds(
25+
{ lat: 37.37808200917261, lng: -122.13741583377849 },
26+
{ lat: 37.416676154341324, lng: -122.02261728794109 }
27+
);
28+
2329
infoWindow = new google.maps.InfoWindow;
2430

2531
// Center the map
@@ -40,7 +46,7 @@ async function initMap(): Promise<void> {
4046
async function searchByTextRequest(textQuery) {
4147
if (textQuery) {
4248
placeList.configureFromSearchByTextRequest({
43-
locationRestriction: map.innerMap.getBounds(),
49+
locationRestriction: bounds,
4450
includedType: "restaurant",
4551
textQuery: textQuery,
4652
}).then(addMarkers);

dist/samples/ui-kit-place-search-text/dist/assets/index--q_VeX4d.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/samples/ui-kit-place-search-text/dist/assets/index-wtb0ylRH.js

-5
This file was deleted.

dist/samples/ui-kit-place-search-text/dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<head>
1010
<title>Place List Text Search with Google Maps</title>
1111
<meta charset="utf-8">
12-
<script type="module" crossorigin src="./assets/index-wtb0ylRH.js"></script>
12+
<script type="module" crossorigin src="./assets/index--q_VeX4d.js"></script>
1313
<link rel="stylesheet" crossorigin href="./assets/index-Dq92m9UV.css">
1414
</head>
1515
<body>

dist/samples/ui-kit-place-search-text/docs/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ let marker = document.querySelector('gmp-advanced-marker');
1515
let markers = {};
1616
let infoWindow;
1717
let center = { lat: 37.395641, lng: -122.077627 };
18+
let bounds;
1819
async function initMap() {
19-
await google.maps.importLibrary("places");
20-
const { InfoWindow } = await google.maps.importLibrary("maps");
20+
const { Map, InfoWindow } = await google.maps.importLibrary("maps");
2121
const { Place } = await google.maps.importLibrary("places");
22+
// Set bounds for location restriction.
23+
bounds = new google.maps.LatLngBounds({ lat: 37.37808200917261, lng: -122.13741583377849 }, { lat: 37.416676154341324, lng: -122.02261728794109 });
2224
infoWindow = new google.maps.InfoWindow;
2325
// Center the map
2426
let adjustedCenter = offsetLatLngRight(center, -0.005);
@@ -35,7 +37,7 @@ async function initMap() {
3537
async function searchByTextRequest(textQuery) {
3638
if (textQuery) {
3739
placeList.configureFromSearchByTextRequest({
38-
locationRestriction: map.innerMap.getBounds(),
40+
locationRestriction: bounds,
3941
includedType: "restaurant",
4042
textQuery: textQuery,
4143
}).then(addMarkers);

dist/samples/ui-kit-place-search-text/docs/index.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ let marker = document.querySelector('gmp-advanced-marker') as any;
1414
let markers = {};
1515
let infoWindow;
1616
let center = { lat: 37.395641, lng: -122.077627 };
17+
let bounds;
1718

1819
async function initMap(): Promise<void> {
19-
await google.maps.importLibrary("places");
20-
const { InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
20+
const { Map, InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
2121
const { Place } = await google.maps.importLibrary("places") as google.maps.PlacesLibrary;
2222

23+
// Set bounds for location restriction.
24+
bounds = new google.maps.LatLngBounds(
25+
{ lat: 37.37808200917261, lng: -122.13741583377849 },
26+
{ lat: 37.416676154341324, lng: -122.02261728794109 }
27+
);
28+
2329
infoWindow = new google.maps.InfoWindow;
2430

2531
// Center the map
@@ -40,7 +46,7 @@ async function initMap(): Promise<void> {
4046
async function searchByTextRequest(textQuery) {
4147
if (textQuery) {
4248
placeList.configureFromSearchByTextRequest({
43-
locationRestriction: map.innerMap.getBounds(),
49+
locationRestriction: bounds,
4450
includedType: "restaurant",
4551
textQuery: textQuery,
4652
}).then(addMarkers);

dist/samples/ui-kit-place-search-text/jsfiddle/demo.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ let marker = document.querySelector('gmp-advanced-marker');
1515
let markers = {};
1616
let infoWindow;
1717
let center = { lat: 37.395641, lng: -122.077627 };
18+
let bounds;
1819
async function initMap() {
19-
await google.maps.importLibrary("places");
20-
const { InfoWindow } = await google.maps.importLibrary("maps");
20+
const { Map, InfoWindow } = await google.maps.importLibrary("maps");
2121
const { Place } = await google.maps.importLibrary("places");
22+
// Set bounds for location restriction.
23+
bounds = new google.maps.LatLngBounds({ lat: 37.37808200917261, lng: -122.13741583377849 }, { lat: 37.416676154341324, lng: -122.02261728794109 });
2224
infoWindow = new google.maps.InfoWindow;
2325
// Center the map
2426
let adjustedCenter = offsetLatLngRight(center, -0.005);
@@ -35,7 +37,7 @@ async function initMap() {
3537
async function searchByTextRequest(textQuery) {
3638
if (textQuery) {
3739
placeList.configureFromSearchByTextRequest({
38-
locationRestriction: map.innerMap.getBounds(),
40+
locationRestriction: bounds,
3941
includedType: "restaurant",
4042
textQuery: textQuery,
4143
}).then(addMarkers);

0 commit comments

Comments
 (0)