You may want to create latitude and longitude boundaries that restrict a user's movement in a 3D
map, or to limit the camera's altitude, heading, or tilt. You can do this by configuring map and
camera restrictions.
The following code sample demonstrates how to use the Map.cameraRestrictions method to restrict both the geographical boundaries of the
camera and the values of the camera's altitude, heading, and tilt.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Select platform: [Android](/maps/documentation/maps-3d/android-sdk/map-camera-restrictions \"View this page for the Android platform docs.\") [iOS](/maps/documentation/maps-3d/ios-sdk/map-camera-restrictions \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/3d/interaction \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\n| This product or feature is Experimental (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google\n| Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](/maps/launch-stages).\n\n\nYou may want to create latitude and longitude boundaries that restrict a user's movement in a 3D\nmap, or to limit the camera's altitude, heading, or tilt. You can do this by configuring map and\ncamera restrictions.\n\nThe following code sample demonstrates how to use the [`Map.cameraRestrictions` method](/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#camerarestrictions_:) to restrict both the geographical boundaries of the\ncamera and the values of the camera's altitude, heading, and tilt. \n\nSwift \n\n```swift\n struct CameraRestrictionDemo: View {\n var body: some View {\n Map(initialCamera: .sanFrancisco, mode: .hybrid)\n .cameraRestrictions([\n .bounds(latitude: 37.7...37.8, longitude: (-122.5)...(-122.4))\n ])\n }\n }\n \n```"]]