diff --git a/dist/samples/place-class/app/index.ts b/dist/samples/place-class/app/index.ts index cf0d81df65..acdfff5aa4 100644 --- a/dist/samples/place-class/app/index.ts +++ b/dist/samples/place-class/app/index.ts @@ -9,7 +9,6 @@ let centerCoordinates = { lat: 37.4161493, lng: -122.0812166 }; async function initMap() { const { Map } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary; - const { Place } = await google.maps.importLibrary("places") as google.maps.PlacesLibrary; map = new Map(document.getElementById('map') as HTMLElement, { center: centerCoordinates, @@ -19,10 +18,11 @@ async function initMap() { // [END_EXCLUDE] }); - getPlaceDetails(Place); + getPlaceDetails(); } -async function getPlaceDetails(Place) { +async function getPlaceDetails() { + const { Place } = await google.maps.importLibrary("places") as google.maps.PlacesLibrary; const { AdvancedMarkerElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary; // Use place ID to create a new Place instance. const place = new Place({ @@ -46,4 +46,4 @@ async function getPlaceDetails(Place) { } initMap(); -export { }; \ No newline at end of file +export { }; diff --git a/dist/samples/place-class/docs/index.js b/dist/samples/place-class/docs/index.js index d549d55a67..0750cd0feb 100644 --- a/dist/samples/place-class/docs/index.js +++ b/dist/samples/place-class/docs/index.js @@ -9,7 +9,6 @@ let centerCoordinates = { lat: 37.4161493, lng: -122.0812166 }; async function initMap() { const { Map } = await google.maps.importLibrary("maps"); - const { Place } = await google.maps.importLibrary("places"); map = new Map(document.getElementById("map"), { center: centerCoordinates, @@ -18,11 +17,12 @@ async function initMap() { mapId: "4504f8b37365c3d0", // [END_EXCLUDE] }); - getPlaceDetails(Place); + getPlaceDetails(); } // [START maps_place_class_fetchfields] -async function getPlaceDetails(Place) { +async function getPlaceDetails() { + const { Place } = await google.maps.importLibrary("places"); const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); // Use place ID to create a new Place instance. const place = new Place({ diff --git a/dist/samples/place-class/iframe/index.html b/dist/samples/place-class/iframe/index.html index e5f6ab378f..b01e764dae 100644 --- a/dist/samples/place-class/iframe/index.html +++ b/dist/samples/place-class/iframe/index.html @@ -8,7 +8,7 @@ Place Class - + diff --git a/dist/samples/place-class/jsfiddle/demo.js b/dist/samples/place-class/jsfiddle/demo.js index 66ec4e9218..c3b3fb4433 100644 --- a/dist/samples/place-class/jsfiddle/demo.js +++ b/dist/samples/place-class/jsfiddle/demo.js @@ -8,7 +8,6 @@ let centerCoordinates = { lat: 37.4161493, lng: -122.0812166 }; async function initMap() { const { Map } = await google.maps.importLibrary("maps"); - const { Place } = await google.maps.importLibrary("places"); map = new Map(document.getElementById("map"), { center: centerCoordinates, @@ -17,10 +16,11 @@ async function initMap() { mapId: "4504f8b37365c3d0", // [END_EXCLUDE] }); - getPlaceDetails(Place); + getPlaceDetails(); } -async function getPlaceDetails(Place) { +async function getPlaceDetails() { + const { Place } = await google.maps.importLibrary("places"); const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); // Use place ID to create a new Place instance. const place = new Place({ diff --git a/dist/samples/place-class/playground/index.ts b/dist/samples/place-class/playground/index.ts index 9de8b5e752..9d7575a4e2 100644 --- a/dist/samples/place-class/playground/index.ts +++ b/dist/samples/place-class/playground/index.ts @@ -5,9 +5,6 @@ async function initMap() { const { Map } = (await google.maps.importLibrary( "maps", )) as google.maps.MapsLibrary; - const { Place } = (await google.maps.importLibrary( - "places", - )) as google.maps.PlacesLibrary; map = new Map(document.getElementById("map") as HTMLElement, { center: centerCoordinates, @@ -17,10 +14,13 @@ async function initMap() { // [END_EXCLUDE] }); - getPlaceDetails(Place); + getPlaceDetails(); } -async function getPlaceDetails(Place) { +async function getPlaceDetails() { + const { Place } = (await google.maps.importLibrary( + "places", + )) as google.maps.PlacesLibrary; const { AdvancedMarkerElement } = (await google.maps.importLibrary( "marker", )) as google.maps.MarkerLibrary;