معالجة الأخطاء
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المطوّرون في المنطقة الاقتصادية الأوروبية
بعد تقديم طلب، قد تتلقّى ردًا يتضمّن تفاصيل الخطأ.
مربّعات ثنائية الأبعاد وصور "التجوّل الافتراضي"
توضّح القائمة التالية الأخطاء التي قد تواجهها عند استخدام مربّعات ثنائية الأبعاد وصور "التجوّل الافتراضي".
حدث خطأ أثناء عرض القائمة.
توضّح القائمة التالية الأخطاء التي قد تواجهها عند استخدام Map Tiles API.
required
- لا يتضمّن طلبك مَعلمة عنوان URL. يُرجى العِلم أنّ رسالة الخطأ تشير إلى
المَعلمة غير المتوفّرة.
-
notFound
، invalid
قيم x
أو y
أو z
خارج النطاق.
بالنسبة إلى مربّعات الخرائط العادية، يعتمد الحد الأقصى لمستوى التكبير على مربّع الخريطة المحدّد وخيارات الخريطة التي طلبتها.
بالنسبة إلى مربّعات الخرائط العادية، يجب أن يكون الإحداثي x ضمن النطاق
[0, (2^zoom)-1].
بالنسبة إلى مربّعات الخرائط العادية، يجب أن يكون الإحداثي y ضمن النطاق
[0, (2^(zoom-1))-1].
بالنسبة إلى مربّعات "التجوّل الافتراضي"، يجب أن يكون مستوى التكبير بين صفر وخمسة، مع تضمين القيمتين.
بالنسبة إلى مربّعات Street View، تكون نطاقات الإحداثيات x وy هي نفسها كما هو الحال مع مربّعات الخريطة العادية، وذلك حتى مستوى التكبير خمسة. في هذه الحالة، تكون القيم القصوى هي imageHeight
أو imagewidth
مقسومة على tileHeight
أو tileWidth
.
forbidden
:
الأسباب المحتملة:
لا يتضمّن الطلب مفتاحًا صالحًا لواجهة برمجة التطبيقات.
الرسالة: Your request cannot be served. Please ensure the parameters and
request type are valid for your account and region.
لا تتوفّر مربّعات الأقمار الصناعية الثنائية الأبعاد في المشاريع المرتبطة بحساب فوترة يتضمّن عنوانًا في المنطقة الاقتصادية الأوروبية. لمزيد من المعلومات، يُرجى الاطّلاع على تعديلات على Map Tiles API للعملاء في المنطقة الاقتصادية الأوروبية.
expired
- انتهت صلاحية الرمز المميّز
session
. يكون الرمز المميز للجلسة صالحًا لمدة أسبوعَين من وقت إنشائه. يُرجى العِلم بأنّ هذا قد يتغيّر بدون إشعار. إذا تلقّيت هذا الخطأ، عليك الحصول على رمز مميّز جديد للجلسة، كما هو موضّح في مقالة استخدام رموز الجلسات المميزة.
badRequest
طلبك غير صالح. تشمل الأسباب الشائعة لذلك ما يلي:
لقد حدّدت نوع خريطة terrain
بدون تضمين طبقة roadmap
.
لقد أدرجت مصفوفة styles
لنوع خريطة غير خريطة الطريق.
أرسلت قيمة خط العرض/خط الطول، بالإضافة إلى رقم تعريف بانوراما في طلب بيانات وصفية خاص بميزة "التجوّل الافتراضي".
-
quotaExceeded
، rateLimitExceeded
تجاوز تطبيقك الحصة المسموح بها أو عدد الطلبات المسموح بها في الثانية.
مثال على الخطأ
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"errors": [
{
"message": "The request is missing a valid API key.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
إعادة محاولة تنفيذ الطلبات
عندما يتعذّر تنفيذ الطلبات بسبب الرمزين quotaExceeded
وrateLimitExceeded
، عليك إعادة محاولة تنفيذ الطلب بطريقة لا تؤدي إلى إغراق خوادم Google بالطلبات المعطّلة أو الأخطاء الواسعة النطاق، لأنّ العديد من العملاء يحاولون إعادة تنفيذ الطلبات بشكل متسلسل وسريع. وهذا يعني استخدام
الرقود الأسي الثنائي
عند إعادة محاولة إرسال طلباتك. يفرض التراجع الأسي عليك توزيع طلباتك على فترات زمنية مختلفة، وذلك لإتاحة الوقت للخادم كي يستعيد عافيته.
على سبيل المثال، إذا تعذّر تنفيذ طلب، أعِد المحاولة بعد ثانية واحدة. إذا لم تنجح هذه المحاولة أيضًا، أعِد محاولة طلبك بعد ثانيتين. إذا تعذّر تنفيذ هذا الطلب أيضًا، أعِد المحاولة بعد أربع ثوانٍ. وبالتالي، يمكنك توزيع كل طلب متتالٍ بشكل فعّال عن طريق مضاعفة المدة الزمنية بين الطلبات.
مربّعات ثلاثية الأبعاد
قد لا تكون الأخطاء الواردة من خادم Google واضحة لك لأنّك تصل إلى المربّعات الواقعية من خلال أداة عرض مسؤولة عن معالجة أخطاء الخادم.
أخطاء في أداة عرض المربّعات
على سبيل المثال، يتعذّر عادةً برنامج العرض CesiumJS بدون إظهار أي رسالة خطأ عند حدوث أخطاء في الخادم، ما قد يؤدي إلى حدوث أي شيء، بدءًا من الأعطال والشاشات الفارغة وصولاً إلى عدم تحميل مربّعات معيّنة.
تعتمد الطريقة التي تستخدمها لتصحيح أخطاء الخادم على أداة العرض المحدّدة التي تستخدمها. بالنسبة إلى أدوات العرض المستندة إلى المتصفّح، مثل CesiumJS، يمكنك فحص عدد الزيارات على الشبكة باستخدام الأدوات المضمّنة في معظم المتصفّحات. على سبيل المثال، يمكنك استخدام أدوات مطوّري البرامج في Chrome.
الأخطاء الشائعة
تحتوي القائمة التالية على تفاصيل حول الأخطاء الأكثر شيوعًا التي قد تواجهك.
- 400: وسيطة غير صالحة
- مفاتيح واجهة برمجة التطبيقات أو مَعلمات طلب البحث أو معرّفات المربّعات أو مجموعات المربّعات غير صالحة، أو رمز مميّز لجلسة منتهية الصلاحية
- 400: قيمة غير صالحة
- تأكَّد من أنّ mapType الذي تم إرسال طلب
createSessionToken
به يطابق mapType
المستخدَم في نقطة نهاية المربّعات اللاحقة. على سبيل المثال، لا يمكن استخدام رمز مميّز لجلسة streetview
لطلب مربّع roadmap
.
403: تم رفض الإذن
الأسباب المحتملة:
مفتاح واجهة برمجة التطبيقات غير متوفّر أو اتصال SSL غير متوفّر أو لم تتم إضافة مفتاح واجهة برمجة التطبيقات إلى قائمة السماح لـ 3D Tiles. يُرجى التواصل مع فريق الدعم في Google وإرسال رقم تعريف مشروعك ليتم إضافتك إلى القائمة المسموح بها لاستخدام وظيفة 3D Tiles في Map Tiles API.
الرسالة: Your request cannot be served. Please ensure the parameters and
request type are valid for your account and region.
لا تتوفّر مربّعات ثلاثية الأبعاد واقعية في المشاريع المرتبطة بحساب فوترة يتضمّن عنوانًا في المنطقة الاقتصادية الأوروبية. لمزيد من المعلومات، يُرجى الاطّلاع على تعديلات على Map Tiles API للعملاء في المنطقة الاقتصادية الأوروبية.
- 429: عدد كبير جدًا من الطلبات
- تم استنفاد حصتك. يُرجى التواصل مع فريق الدعم في Google لزيادة حصتك.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eRequests for 2D Tiles and Street View imagery may result in errors such as \u003ccode\u003erequired\u003c/code\u003e, \u003ccode\u003enotFound\u003c/code\u003e, \u003ccode\u003einvalid\u003c/code\u003e, \u003ccode\u003eforbidden\u003c/code\u003e, \u003ccode\u003eexpired\u003c/code\u003e, \u003ccode\u003ebadRequest\u003c/code\u003e, \u003ccode\u003equotaExceeded\u003c/code\u003e, or \u003ccode\u003erateLimitExceeded\u003c/code\u003e indicating issues with parameters, API keys, or quota limits.\u003c/p\u003e\n"],["\u003cp\u003eWhen retrying requests that failed due to \u003ccode\u003equotaExceeded\u003c/code\u003e or \u003ccode\u003erateLimitExceeded\u003c/code\u003e, it's crucial to implement exponential backoff to avoid overwhelming Google servers.\u003c/p\u003e\n"],["\u003cp\u003e3D Tiles errors are often handled by the renderer, requiring debugging techniques like inspecting network traffic using browser developer tools.\u003c/p\u003e\n"],["\u003cp\u003eCommon 3D Tiles errors include 400 (Invalid argument), 403 (Permission denied), and 429 (Too many requests), which can be addressed by verifying API keys, SSL connections, allowlisting, or adjusting quotas.\u003c/p\u003e\n"]]],["Upon encountering errors when using Map Tiles API, common issues include missing URL parameters (`required`), out-of-range coordinates (`notFound`, `invalid`), an invalid API key (`forbidden`), or an expired session token (`expired`). Other errors involve malformed requests (`badRequest`) or exceeding usage limits (`quotaExceeded`, `rateLimitExceeded`). When rate limiting occurs, implement exponential backoff when retrying requests. 3D Tiles errors may be handled by the renderer and include issues like invalid keys, missing API key, or exceeded quota.\n"],null,["# Handling errors\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google\n| Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. [Learn more](/maps/comms/eea/faq). In addition, certain content from the Map Tiles API will no longer be returned. [Learn more](/maps/comms/eea/map-tiles).\n\nAfter you make a request, you might receive a response that contains error\ndetails.\n\n2D Tiles and Street View imagery\n--------------------------------\n\nThe following list details the errors that you might encounter when using 2D\nTiles and Street View imagery.\n\n### Error listing\n\nThe following list details the errors you might encounter when using the\nMap Tiles API.\n\n`required`\n: Your request is missing a URL parameter. Note that the error message indicates\n which parameter is missing.\n\n`notFound`, `invalid`\n\n: Your \u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ex\u003c/code\u003e\u003c/var\u003e, \u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ey\u003c/code\u003e\u003c/var\u003e, or\n \u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ez\u003c/code\u003e\u003c/var\u003e values are out of range.\n\n - For regular map tiles, the maximum zoom level depends on the particular\n map tile, and on the map options that you requested.\n\n - For regular map tiles, the x coordinate must be in the range\n \\[0, (2\\^zoom)-1\\].\n\n - For regular map tiles, the y coordinate must be in the range\n \\[0, (2\\^(zoom-1))-1\\].\n\n - For Street View Tiles, zoom must be between zero and five, inclusive.\n\n - For Street View Tiles, the x and y coordinate ranges are the same as\n for regular map tiles, until level five zoom. At that point, the maximum\n values are `imageHeight` or `imagewidth` divided by `tileHeight` or\n `tileWidth`.\n\n`forbidden`:\n\nPossible causes:\n\n- The request is missing a valid API key.\n\n- Message: `Your request cannot be served. Please ensure the parameters and\n request type are valid for your account and region.`\n\n 2D satellite tiles are not available in projects that are linked to a\n billing account with a European Economic Area (EEA) address. For more\n information, see [Map Tiles API adjustments for EEA\n customers](/maps/comms/eea/map-tiles#adjustments).\n\n`expired`\n: Your `session` token has expired. A session token is valid for\n two weeks from its creation time. Note that this might change\n without notice. If you receive this error, then you must get a new session\n token, as described in\n [Use session tokens](/maps/documentation/tile/session_tokens).\n\n`badRequest`\n\n: Your request was malformed. Common reason for this include:\n\n - You specified a `terrain` map type without including a `roadmap` layer.\n\n - You included a `styles` array for a non-roadmap map type.\n\n - You sent a lat/lng value, as well as a panorama ID in a Street View metadata\n request.\n\n`quotaExceeded`, `rateLimitExceeded`\n\n: Your application has exceeded its allowed quota, or it exceeded it allowed\n number of queries per second.\n\n### Example error\n\n {\n \"error\": {\n \"code\": 403,\n \"message\": \"The request is missing a valid API key.\",\n \"errors\": [\n {\n \"message\": \"The request is missing a valid API key.\",\n \"domain\": \"global\",\n \"reason\": \"forbidden\"\n }\n ],\n \"status\": \"PERMISSION_DENIED\"\n }\n }\n\n### Retrying requests\n\nWhen requests fail with `quotaExceeded` and `rateLimitExceeded`, you should\nretry your request in such as way that broken requests or wide-scale failures\ndon't flood Goodle servers---as many clients attempt to retry requests in quick\nsuccession. This means using\n[exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff)\nwhen you retry your requests. Exponential backoff forces you to spread your\nrequests out in time, to give the server time to recover.\n\nFor example, if a request fails, then retry again after one second. But if that\nattempt fails as well, then retry your request again after two seconds. If that\nrequest also fails, then try again after four seconds. So you effectively spread\neach successive request out by simply doubling the length of time between them.\n\n3D Tiles\n--------\n\nErrors from Google's server might not be obvious to you because you access\nphotorealistic tiles through a renderer, which is responsible for handling\nserver errors.\n\n### Tile renderer errors\n\nFor example, the CesiumJS renderer usually fails silently when server errors\noccur, which can result in anything from crashes, blank screens, to specific\ntiles not loading.\n\nThe technique that you use to debug server errors will depend on the particular\nrenderer you use. For browser-based renderers like CesiumJS, you can inspect\nthe network traffic with tools built into most browsers. For example, you can\nuse\n[Chrome DevTools](https://developer.chrome.com/docs/devtools/).\n\n### Common errors\n\nThe following list contains details about the most common errors that you might\nencounter.\n\n400: Invalid argument\n: Invalid API keys, query parameters, tile/tileset IDs, or an expired session\n token.\n\n400: Invalid Value\n: Make sure that the mapType with which the `createSessionToken` request was\n made matches the `mapType` used in the subsequent tile endpoint. For example, a\n `streetview` session token cannot be used to request a `roadmap` tile.\n\n**403: Permission denied**\n\nPossible causes:\n\n- Missing API key, missing SSL connection, or your API key has not been added\n to the allowlist for 3D Tiles. Contact [Google\n Support](/maps/support#contact-maps-support) with your project ID to get\n added to the allowlist for the 3D Tiles functionality of the\n Map Tiles API.\n\n- Message: `Your request cannot be served. Please ensure the parameters and\n request type are valid for your account and region.`\n\n Photorealistic 3D tiles are not available in projects that are linked to a\n billing account with a European Economic Area (EEA) address. For more\n information, see [Map Tiles API adjustments for EEA\n customers](/maps/comms/eea/map-tiles#adjustments).\n\n429: Too many requests\n: Your quota is exhausted. Contact\n [Google Support](/maps/support#contact-maps-support) to increase your quota."]]