Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.3.0",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@googlemaps/extended-component-library": "^0.6.10",
"@googlemaps/extended-component-library": "^0.6.11",
"@googlemaps/js-api-loader": "^1.15.1",
"@googlemaps/markerclusterer": "2.3.1",
"@googlemaps/react-wrapper": "^1.1.35",
Expand Down
33 changes: 1 addition & 32 deletions samples/rgm-college-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,6 @@ import * as GMPX from '@googlemaps/extended-component-library/react';
import { OverlayLayout } from '@googlemaps/extended-component-library/overlay_layout.js';
import { PlacePicker } from '@googlemaps/extended-component-library/place_picker.js';

/* Google Maps JS SDK typings, which are
* published as `@types/google.maps`. However, sometimes there is a delay
* in published typings. Components should use types from this file so we
* can centrally shim/unshim them when necessary.
*/

export declare interface AuthorAttribution {
displayName: string;
photoURI: string|null;
uri: string|null;
}

export declare type Photo = Omit<google.maps.places.Photo, 'attributions'>& {
authorAttributions: AuthorAttribution[];
};

export declare type Review =
Omit<google.maps.places.Review, 'author'|'authorURI'|'authorPhotoURI'>& {
authorAttribution: AuthorAttribution|null;
};

export declare interface Place extends Omit<
google.maps.places.Place,
'photos'|'reviews'|'fetchFields'|'accessibilityOptions'> {
photos?: Photo[];
reviews?: Review[];
accessibilityOptions?: {hasWheelchairAccessibleEntrance: boolean|null}|null;
fetchFields: (options: google.maps.places.FetchFieldsRequest) =>
Promise<{place: Place}>;
}

const API_KEY =
globalThis.GOOGLE_MAPS_API_KEY ?? ("YOUR_API_KEY");
const DEFAULT_CENTER = { lat: -34.397, lng: 150.644 };
Expand All @@ -55,7 +24,7 @@ const DEFAULT_ZOOM_WITH_LOCATION = 16;
const App = () => {
const overlayLayoutRef = useRef<OverlayLayout>(null);
const pickerRef = useRef<PlacePicker>(null);
const [college, setCollege] = useState<Place | undefined>(undefined);
const [college, setCollege] = useState<google.maps.places.Place | undefined>(undefined);

return (
<div className="App">
Expand Down
2 changes: 1 addition & 1 deletion samples/rgm-college-picker/rgm-college-picker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "React Google Maps - College Picker Appd",
"title": "React Google Maps - College Picker App",
"libraries": [],
"version": "weekly",
"tag": "rgm_college_picker",
Expand Down