[null,null,["上次更新時間:2025-04-29 (世界標準時間)。"],[],[],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\u003cbr /\u003e\n\n| This product or feature is in Preview (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\n| descriptions](/maps/launch-stages).\n\n\u003cbr /\u003e\n\nIt may be desirable for you to control the camera's pan, maximum altitude, or to\ncreate latitude and longitude boundaries restricting a user's movement in a\ngiven map. You can do this using *camera restrictions*.\n\nThe following example shows a map with location boundaries set to limit the\ncamera's movement:\n\n\nRestrict map bounds\n\nYou can restrict the geographical boundaries of the camera by setting the\n`bounds` option.\n\nThe following code sample demonstrates restricting the map bounds: \n\n async function init() {\n const { Map3DElement, MapMode } = await google.maps.importLibrary(\"maps3d\");\n\n const map = new Map3DElement({\n center: { lat: 37.7704, lng: -122.3985, altitude: 500 },\n tilt: 67.5,\n mode: MapMode.HYBRID,bounds: {south: 37, west: -123, north: 38, east: -121}\n });\n\n init();\n }\n\nRestrict the camera\n\nYou can restrict the movement of the camera by setting any of the following\noptions:\n\n- `maxAltitude`\n- `minAltitude`\n- `maxHeading`\n- `minHeading`\n- `maxTilt`\n- `minTilt`\n\nThe following code sample demonstrates restricting the camera: \n\n async function init() {\n const { Map3DElement, MapMode } = await google.maps.importLibrary(\"maps3d\");\n\n const map = new Map3DElement({\n center: { lat: 37.7704, lng: -122.3985, altitude: 500 },\n tilt: 67.5,\n mode: MapMode.HYBRID,minAltitude: 1,\n maxAltitude: 1000,\n minTilt: 35,\n maxTilt: 55\n });\n\n document.body.append(map);\n }\n\n init();\n\nRestrict map and camera bounds\n\nYou can simultaneously restrict both map and camera bounds. The following code\nsample demonstrates restricting both map and camera boundaries: \n\n async function init() {\n const { Map3DElement, MapMode } = await google.maps.importLibrary(\"maps3d\");\n\n const map = new Map3DElement({\n center: { lat: 37.7704, lng: -122.3985, altitude: 500 },\n tilt: 67.5,\n mode: MapMode.HYBRID,minAltitude: 1,\n maxAltitude: 1000,\n minTilt: 35,\n maxTilt: 55,\n bounds: {south: 37, west: -123, north: 38, east: -121}\n });\n\n document.body.append(map);\n }\n\n init();"]]