संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एपीआई पासकोड और बिलिंग से जुड़ी गड़बड़ियां
कुछ मामलों में, आपको काला किया गया मैप या 'नेगेटिव' स्ट्रीट व्यू इमेज दिख सकती है. साथ ही, उस पर "सिर्फ़ डेवलपमेंट के लिए" टेक्स्ट वाला वॉटरमार्क दिख सकता है.
आम तौर पर, इस तरह की गड़बड़ी से पता चलता है कि एपीआई पासकोड या बिलिंग में कोई समस्या है.
Google Maps Platform के प्रॉडक्ट इस्तेमाल करने के लिए, आपके खाते पर बिलिंग की सुविधा चालू होनी चाहिए. साथ ही, सभी अनुरोधों में मान्य एपीआई पासकोड शामिल होना चाहिए. इस समस्या को हल करने के लिए, यहां दिया गया तरीका अपनाएं:
क्या एपीआई पासकोड का इस्तेमाल किया जा रहा है?
मुझे पूरी तरह से नहीं पता. मैं यह कैसे पता लगाऊं कि एपीआई पासकोड का इस्तेमाल किया जा रहा है या नहीं?
एपीआई पासकोड को यूआरएल में key पैरामीटर के तौर पर पास किया जाता है. इसका इस्तेमाल, Maps JavaScript API को लोड करने के लिए किया जाता है. एपीआई पासकोड का इस्तेमाल किया जा रहा है या नहीं, यह पता करने के लिए यहां कुछ विकल्प दिए गए हैं:
Google Maps Platform API Checker Chrome एक्सटेंशन का इस्तेमाल करें. इससे यह पता लगाया जा सकता है कि आपकी वेबसाइट, Google के लाइसेंस वाले Maps API को सही तरीके से लागू कर रही है या नहीं.
अगर Maps JavaScript API को लोड करने के लिए किसी लाइब्रेरी या प्लग इन का इस्तेमाल किया जा रहा है, तो
उस लाइब्रेरी की सेटिंग देखें और एपीआई पासकोड का विकल्प ढूंढें.
अपने ब्राउज़र में गड़बड़ियां देखें.
अगर आपको नीचे दिए गए मैसेज दिखते हैं, तो इसका मतलब है कि एपीआई पासकोड का इस्तेमाल सही तरीके से नहीं किया जा रहा है:
Google Maps JavaScript API से जुड़ी चेतावनी:
NoApiKeys
अगर आपके पास अपने ऐप्लिकेशन के सोर्स कोड का ऐक्सेस है, तो Maps JavaScript API को लोड करने के लिए इस्तेमाल किए जाने वाले
<script> टैग को ढूंढें.
Maps JavaScript API को लोड करते समय, नीचे दिए गए कोड में YOUR_API_KEY
को अपने एपीआई पासकोड से बदलें.
ब्राउज़र में, अपनी वेबसाइट से जनरेट होने वाले नेटवर्क ट्रैफ़िक की जांच करें.
Chrome में, इसे देखने के लिए
DevToolsनेटवर्क टैब का इस्तेमाल करें.
यहां आपको अपनी वेबसाइट से किए गए नेटवर्क अनुरोध दिखेंगे. Maps JavaScript API का इस्तेमाल करके किए गए अनुरोध, maps/api/js पाथ में होंगे.
यहां यह पुष्टि की जा सकती है कि अनुरोधों में key पैरामीटर का इस्तेमाल किया जा रहा है या नहीं.
नेटवर्क टैब देखते समय, maps/api/js के हिसाब से
अपने नेटवर्क ट्रैफ़िक को फ़िल्टर करने से मदद मिल सकती है.
नहीं, मैं एपीआई पासकोड का इस्तेमाल नहीं कर रहा/रही.
बढ़िया! अब यह देखें कि आपके प्रोजेक्ट से कोई बिलिंग खाता जुड़ा है या नहीं.
क्या आपके प्रोजेक्ट से कोई बिलिंग खाता जुड़ा है?
मुझे पूरी तरह से नहीं पता. मैं कैसे देखूं कि बिलिंग खाता मेरे प्रोजेक्ट से जुड़ा है या नहीं?
Google Cloud console में
बिलिंग पेज पर जाएं और वह प्रोजेक्ट चुनें जिसके तहत आपकी एपीआई पासकोड बनाई गई थी.
यह पुष्टि करने के लिए कि कुंजी, प्रोजेक्ट से जुड़ी है:
क्रेडेंशियल सेक्शन पर जाएं. इसे ऐक्सेस करने के लिए, बाईं ओर मौजूद बार में,
Google Maps Platform > क्रेडेंशियल पर जाएं.
देखें कि आपकी वेबसाइट पर फ़िलहाल इस्तेमाल की जा रही एपीआई कुंजी, सूची में शामिल है या नहीं.
अगर ऐसा नहीं है, तो किसी दूसरे प्रोजेक्ट पर स्विच करें और वहां क्रेडेंशियल देखें.
अगर आपको अपनी एपीआई कुंजी का प्रोजेक्ट नहीं मिल रहा है, तो हो सकता है कि आपने इस प्रोजेक्ट का ऐक्सेस खो दिया हो.
अपने संगठन के अन्य लोगों से मदद मांगें. अगर ओरिजनल प्रोजेक्ट का पता नहीं चलता है, तो आपको:
नया प्रोजेक्ट बनाएं. ऐसा करने के लिए, प्रोजेक्ट की सूची से नया प्रोजेक्ट चुनें या रिसॉर्स मैनेजर पेज पर जाकर प्रोजेक्ट बनाएं चुनें.
नई एपीआई कुंजी बनाएं. ऐसा करने के लिए, क्रेडेंशियल पेज पर जाएं.
वहां जाकर, क्रेडेंशियल बनाएं पर क्लिक करें. इसके बाद, एपीआई कुंजी चुनें.
Cloud Console में अपना प्रोजेक्ट ढूंढने के बाद,
बाईं ओर मौजूद मेन्यू में बिलिंग सेक्शन पर जाकर देखें कि कोई बिलिंग खाता अटैच है या नहीं.
नहीं, मेरे प्रोजेक्ट से कोई बिलिंग खाता नहीं जुड़ा है.
क्या एपीआई के लिए, हर दिन की तय सीमा से ज़्यादा अनुरोध किए गए हैं?
अगर आपने अपने किसी भी एपीआई पर रोज़ की सीमा सेट की है, तो रोज़ की सीमा बढ़ाकर इस समस्या को हल किया जा सकता है. ऐसा आम तौर पर, अनचाहे ट्रैफ़िक को रोकने के लिए किया जाता है.
Cloud Console में,
एपीआई और सेवाओं के डैशबोर्ड पर जाकर,
हर दिन के लिए तय की गई सीमाएं देखी जा सकती हैं. इसके बाद:
अगर कहा जाए, तो कोई प्रोजेक्ट चुनें.
सूची से कोई एपीआई चुनें. इसके बाद, कोटा टैब पर क्लिक करें.
क्या आपकी एपीआई कुंजी पर आईपी पतों से जुड़ी पाबंदी है?
आईपी पतों पर पाबंदी वाली एपीआई कुंजियों का इस्तेमाल, सिर्फ़ उन वेब सेवाओं के साथ किया जा सकता है जिन्हें
सर्वर साइड से इस्तेमाल करने के लिए बनाया गया है. जैसे,
Geocoding API और अन्य वेब सेवा एपीआई.
इनमें से ज़्यादातर वेब सेवाओं के बराबर की सेवाएं, Maps JavaScript API में भी उपलब्ध हैं. उदाहरण के लिए, जियोकोडिंग सेवा देखें.
Maps JavaScript API क्लाइंट साइड सेवाओं का इस्तेमाल करने के लिए, आपको एक अलग एपीआई पासकोड बनाना होगा. इसे एचटीटीपी रेफ़रर की पाबंदी से सुरक्षित किया जा सकता है. इसके लिए, एपीआई पासकोड पाना, जोड़ना, और उस पर पाबंदी लगाना लेख पढ़ें.
अगर आपका कोड काम नहीं कर रहा है, तो:
Maps कोड को अप और रन करने में आपकी मदद करने के लिए, ब्रैंडन केनी और मनो मार्क्स ने इस वीडियो में कुछ सामान्य गड़बड़ियों के बारे में बताया है. साथ ही, उन्हें ठीक करने का तरीका भी बताया है.
टाइपिंग की गलतियां देखें. याद रखें कि JavaScript एक केस-सेंसिटिव (बड़े और छोटे अक्षरों में अंतर) भाषा है.
बुनियादी बातें देखें - मैप बनाने के दौरान, कुछ सामान्य समस्याएं आती हैं. जैसे:
पुष्टि करें कि आपने मैप के विकल्पों में zoom
और center प्रॉपर्टी की जानकारी दी हो.
पक्का करें कि आपने कोई ऐसा div एलिमेंट तय किया हो जिसमें स्क्रीन पर मैप दिखेगा.
पक्का करें कि मैप के div एलिमेंट की ऊंचाई हो. डिफ़ॉल्ट रूप से,
div एलिमेंट की ऊंचाई 0 होती है. इसलिए, ये एलिमेंट दिखते नहीं हैं.
समस्याओं की पहचान करने के लिए, JavaScript डीबगर का इस्तेमाल करें. जैसे, Chrome डेवलपर टूल में उपलब्ध डीबगर. सबसे पहले, JavaScript कंसोल में गड़बड़ियां देखें.
Stack Overflow पर सवाल पोस्ट करें. बेहतर सवाल पोस्ट करने के बारे में दिशा-निर्देश, सहायता पेज पर उपलब्ध हैं.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eTo use the Google Maps JavaScript API, you must include an API key and enable billing for your project.\u003c/p\u003e\n"],["\u003cp\u003eIf you see a darkened map or a negative Street View image watermarked with "for development purposes only", you might have an issue with your API key or billing.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting steps involve verifying your API key implementation, checking billing account attachment, ensuring billing method validity, and reviewing daily usage limits and IP restrictions.\u003c/p\u003e\n"],["\u003cp\u003eThis page offers solutions to common billing and API errors, and links to resources for further assistance.\u003c/p\u003e\n"]]],["Using the Maps JavaScript API requires a valid API key and enabled billing. Issues like a darkened map typically stem from these. Verify API key usage via browser checks, source code, or network traffic. Ensure the project linked to your API key has an active billing account. Check for invalid payment methods or exceeded API daily limits. If restricted by IP address, create a key with HTTP referrers. Troubleshoot by checking for typos, verifying map element properties, or using a JavaScript debugger.\n"],null,["# Troubleshooting\n\n| **Reminder:** To use the Maps JavaScript API:\n|\n| - All Maps JavaScript API requests must include an API key; we no longer support keyless access.\n| - You must [enable billing](https://console.cloud.google.com/project/_/billing/enable?utm_source=Docs_BillingNudge) on each of your projects.\n\n### API Key and Billing Errors\n\n\nUnder certain circumstances, a darkened map, or 'negative' Street View image,\nwatermarked with the text \"for development purposes only\", may be displayed.\nThis behavior typically indicates issues with either an API key or billing.\nIn order to use Google Maps Platform products, billing must be enabled on your account,\nand all requests must include a valid API key. The following flow will help troubleshoot this:\n\n#### Are you using an API key?\n\n#### I'm not sure. How can I check if I am using an API key?\n\nAn API key is passed as the `key` parameter in the URL that is used to load the\nMaps JavaScript API. Here are a few options to check if you are using an API key:\n\n- Use the [Google Maps Platform API Checker](https://chrome.google.com/webstore/detail/google-maps-platform-api/mlikepnkghhlnkgeejmlkfeheihlehne) Chrome extension. This allows you to determine if your website is properly implementing Google's licensed Maps APIs.\n- If you are using a library or plugin to load the Maps JavaScript API, check the settings for that library and look for an API key option.\n- Check [errors in your browser](/maps/documentation/javascript/error-messages#checking-errors). If you see the following messages, you are not using your API key correctly:\n - Google Maps JavaScript API warning: [NoApiKeys](/maps/documentation/javascript/error-messages#no-api-keys)\n - Google Maps JavaScript API error: [MissingKeyMapError](/maps/documentation/javascript/error-messages#missing-key-map-error)\n\n#### For web developers:\n\n- If you have access to the source code of your application, look for the `\u003cscript\u003e` tag which is used to load the Maps JavaScript API. When loading the Maps JavaScript API, substitute `YOUR_API_KEY` in the code below with your API key. \n\n ```html\n \u003cscript async defer\n src=\"https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap\"\u003e\n \u003c/script\u003e\n ```\n- Check the network traffic generated by your website in the browser. In Chrome, this can be viewed using the [DevTools](/web/tools/chrome-devtools) **Network** tab. Here you will see the network requests made by your website. Requests made using the Maps JavaScript API will be under the path `maps/api/js`. Here you can confirm if the requests are using the `key` parameter. It may be helpful to [filter your network traffic](/web/tools/chrome-devtools/console#filtering_the_console_output) by `maps/api/js` when viewing the **Network** tab.\n\n#### No, I am not using an API key.\n\nTo get an API key, click the button below. If you do not see a guided setup, follow the\nfull instructions at [Get Started with Google Maps\nPlatform](/maps/get-started#procedures).\n\n\n[Get Started](/maps/get-started)\n\n#### Yes, I am using an API key.\n\nGreat! Let's move on and check if a billing account is attached to your project.\n\n#### Is a billing account attached to your project?\n\n#### I'm not sure. How can I check if billing account is attached to my project?\n\nGo to the [Billing page](https://console.cloud.google.com/project/_/billing/enable?utm_source=Docs_BillingNudge) in the Google Cloud console and select the project under which your API key was created.\nTo confirm the key is associated with the project:\n\n1. Go to the **Credentials** section, which can be accessed from the left side bar under **Google Maps Platform \\\u003e Credentials**.\n2. Check that the API key you currently use on your website is listed. If that's not the case, switch to a different project, and check the credentials there.\n3. If you cannot locate the project for your API key, you may have lost access to this project. Ask others in your organization for help. If the original project cannot be located, you should:\n 1. Create a new project. This can be done by selecting **New Project** from the projects list, or by selecting **Create Project** via the [Resource Manager page](https://console.cloud.google.com/cloud-resource-manager).\n 2. Create a new API key. This can be done on the **Credentials** page. Once there click **Create credentials** and then select **API key**.\n\n\nOnce you have located your project in the Cloud console,\ncheck if a billing account is attached by navigating to the [Billing](https://console.cloud.google.com/project/_/billing) section in the left side menu.\n\n#### No, a billing account is not attached to my project.\n\nGo to the [Enable Billing](https://console.cloud.google.com/project/_/billing/enable?utm_source=Docs_BillingNudge) page in the Cloud console\nand add a billing account to your project. For additional information, see\n[Get Started with Google Maps Platform](/maps/get-started).\n\n#### Yes, a billing account is attached to my project.\n\nGreat! Let's make sure the provided billing method is valid.\n\n#### Is the provided billing method no longer valid (for example an expired credit card)?\n\nYou [can add, remove, or update a payment method](https://cloud.google.com/billing/docs/how-to/payment-methods) in the Cloud console.\n\n#### Is there an exceeded self-imposed daily limit on the API?\n\nIf you have set a daily limit on any of your APIs, which is common to prevent unexpected increases,\nyou can resolve this by [increasing your daily limit](/maps/faq#usage_cap).\n\nYou can check your daily limits by going to the\n[APIs \\& Services Dashboard](https://console.cloud.google.com/project/_/apiui/apis/enabled?utm_source=Docs_EnabledAPIsView) in the\nCloud console. Once there:\n\n1. Select a project if prompted.\n2. Select an API from the list, then click the **Quotas** tab.\n\n#### Does your API key have an IP addresses restriction?\n\nAPI keys with an **IP addresses** restriction can only be used with web services that are\nintended for use from the server side (such as the\n[Geocoding API](/maps/documentation/geocoding/start)\nand other [Web Service APIs](/maps/apis-by-platform)).\nMost of these web services have equivalent services within the Maps JavaScript API (for example, see the\n[Geocoding Service](/maps/documentation/javascript/geocoding)).\nTo use the Maps JavaScript API client side services, you will need to create a separate API key which\ncan be secured with an **HTTP referrers** restriction (see\n[Get, add, and restrict an API key](/maps/get-started#api-key)).\n\n### If your code isn't working:\n\nTo help you get your maps code up and running, Brendan Kenny and Mano Marks point out\nsome common mistakes and how to fix them in this video. \n\n- Look for typos. Remember that JavaScript is a case-sensitive language.\n- Check the basics - some of the most common problems occur with the initial map creation. Such as:\n - Confirm that you've specified the `zoom` and `center` properties in your map options.\n - Ensure that you have declared a div element in which the map will appear on the screen.\n - Ensure that the div element for the map has a height. By default, div elements are created with a height of 0, and are therefore invisible.\n\n Refer to our examples for a [reference\n implementation](/maps/documentation/javascript/examples/map-simple).\n- Use a JavaScript debugger to help identify problems, like the one available in the [Chrome\n Developer Tools](/chrome-developer-tools/docs/javascript-debugging). Start by looking in the JavaScript console for errors.\n- Post questions to [Stack\n Overflow](https://stackoverflow.com/questions/ask?tags=google-maps-api-3,google-maps). Guidelines on how to post great questions are available on the [Support](/maps/support) page."]]