请求缺少 HTTP 引荐来源网址,并且您使用的 API 密钥采用了引荐来源网址限制。详细了解如何添加引荐来源。
检查浏览器中的错误
对于结算和 HTTP 引荐来源网址错误,Maps Embed API 会将错误消息写入 window.console。对于无效请求(包括 API 密钥错误和配额错误),控制台中仅会报告 HTTP 4xx 状态代码。本部分说明了如何在 Google Chrome 中查看控制台输出。如果您使用的是任何其他浏览器,请查阅您的浏览器的开发者文档。以下列出了一些其他浏览器中用于查看控制台输出的工具,供您参考。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-03-21。"],[[["The Maps Embed API displays error messages in place of the map or as a darkened, watermarked map when errors occur."],["Invalid requests result in a `4xx` HTTP status code and a descriptive error message, often due to missing or incorrect parameters or an invalid API key."],["API key and quota errors are treated as invalid requests, and can stem from a missing, invalid, or restricted API key, or a disabled API."],["Billing and HTTP referer errors result in a darkened, watermarked map, and may be caused by billing issues, exceeding usage limits, or missing HTTP referers."],["Error messages for billing and referer issues can be found in the browser's console; invalid request errors show only the HTTP status code."]]],["The Maps Embed API displays error messages or a watermarked map when issues occur. Invalid requests trigger a `4xx` status code, indicating problems like missing or incorrect parameters or an invalid API key. Billing or HTTP referer issues result in a watermarked map, caused by disabled billing, invalid payment, exceeded limits, or missing referers. Errors are logged in the browser's console (`window.console`) and can be checked via browser developer tools.\n"]]