diff --git a/samples/places-placeid-finder/README.md b/samples/places-placeid-finder/README.md new file mode 100644 index 00000000..fdc1ceff --- /dev/null +++ b/samples/places-placeid-finder/README.md @@ -0,0 +1,41 @@ +# Google Maps JavaScript Sample + +## places-placeid-finder + +Place ID Finder + +## Setup + +### Before starting run: + +`npm i` + +### Run an example on a local web server + +`cd samples/places-placeid-finder` +`npm start` + +### Build an individual example + +`cd samples/places-placeid-finder` +`npm run build` + +From 'samples': + +`npm run build --workspace=places-placeid-finder/` + +### Build all of the examples. + +From 'samples': + +`npm run build-all` + +### Run lint to check for problems + +`cd samples/places-placeid-finder` +`npx eslint index.ts` + +## 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/samples/places-placeid-finder/index.html b/samples/places-placeid-finder/index.html new file mode 100644 index 00000000..8fc54838 --- /dev/null +++ b/samples/places-placeid-finder/index.html @@ -0,0 +1,28 @@ + + + + + + Place ID Finder + + + + + + + + + + +
+
+ Place ID:
+ +
+ + diff --git a/samples/places-placeid-finder/index.ts b/samples/places-placeid-finder/index.ts new file mode 100644 index 00000000..749a5682 --- /dev/null +++ b/samples/places-placeid-finder/index.ts @@ -0,0 +1,115 @@ +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +// [START maps_places_placeid_finder] +// This sample uses the Place Autocomplete widget to allow the user to search +// for and select a place. The sample then displays an info window containing +// the place ID and other information about the place that the user has +// selected. + +// This example requires the Places library. Include the libraries=places +// parameter when you first load the API. For example: +//