تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
قد يكون من المستحسن أن تتحكم في درجة التحريك للكاميرا أو الحد الأقصى للارتفاع أو
إنشاء حدود لخطوط الطول والعرض تقيّد حركة المستخدم في خريطة معينة. يمكنك إجراء ذلك من خلال القيود المفروضة على الكاميرا.
يوضّح المثال التالي خريطة مع ضبط حدود الموقع الجغرافي للحدّ من حركة الكاميرا:
تقييد حدود الخريطة
يمكنك تقييد الحدود الجغرافية للكاميرا من خلال ضبط
الخيار bounds.
يوضح نموذج الرمز البرمجي التالي تقييد حدود الخريطة:
تاريخ التعديل الأخير: 2025-04-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 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();"]]