From 13ff265faf18e589043534992ef2f5afbd9fc27e Mon Sep 17 00:00:00 2001 From: Angelo Michel Date: Wed, 18 Jan 2023 14:00:39 +0100 Subject: [PATCH] Support for Restricting Map Bounds via restriction prop --- index.d.ts | 1 + src/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/index.d.ts b/index.d.ts index a299afd5..ee50f81d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -39,6 +39,7 @@ export interface IMapProps extends google.maps.MapOptions { centerAroundCurrentLocation?: boolean initialCenter?: google.maps.LatLngLiteral center?: google.maps.LatLngLiteral + restriction?: google.maps.MapRestriction zoom?: number zoomControl?: boolean diff --git a/src/index.js b/src/index.js index edd3abec..29fbe526 100644 --- a/src/index.js +++ b/src/index.js @@ -160,6 +160,7 @@ export class Map extends React.Component { streetViewControlOptions: this.props.streetViewControlOptions, panControl: this.props.panControl, rotateControl: this.props.rotateControl, + restriction: this.props.restriction, fullscreenControl: this.props.fullscreenControl, scrollwheel: this.props.scrollwheel, draggable: this.props.draggable,