GooglePlacesSwift Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
CoordinateRegionRestriction
Specifies that the coordinate region can be used as a search restriction.
Warning
This should not be conformed to by types outside of GooglePlacesSwift. Doing so may
result in a fatal error.
-
Returns the region restriction as URLQueryItem
.
Declaration
Swift
func restriction() -> URLQueryItem
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eCoordinateRegionRestriction\u003c/code\u003e protocol enables using a coordinate region to limit search areas within Google Places.\u003c/p\u003e\n"],["\u003cp\u003eIt is crucial to avoid conforming to this protocol outside of the \u003ccode\u003eGooglePlacesSwift\u003c/code\u003e framework to prevent potential fatal errors.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erestriction()\u003c/code\u003e function transforms the region restriction into a \u003ccode\u003eURLQueryItem\u003c/code\u003e for use in queries.\u003c/p\u003e\n"]]],["The `CoordinateRegionRestriction` protocol defines a coordinate region as a search restriction. It's designed for internal use within GooglePlacesSwift and should not be implemented externally to avoid errors. The core action is the `restriction()` method, which returns the region restriction as a `URLQueryItem`. This function provides the necessary data for use in location based searches.\n"],null,["# GooglePlacesSwift Framework Reference\n\nCoordinateRegionRestriction\n===========================\n\n protocol CoordinateRegionRestriction : ../Protocols.html#/s:17GooglePlacesSwift16CoordinateRegionP\n\nSpecifies that the coordinate region can be used as a search restriction. \nWarning\nThis should not be conformed to by types outside of GooglePlacesSwift. Doing so may result in a fatal error.\n- `\n ``\n ``\n `\n\n ### [restriction()](#/s:17GooglePlacesSwift27CoordinateRegionRestrictionP11restriction10Foundation12URLQueryItemVyF)\n\n `\n ` \n Returns the region restriction as `URLQueryItem`. \n\n #### Declaration\n\n Swift \n\n func restriction() -\u003e URLQueryItem"]]