एपीआई पासकोड पाना और Maps JavaScript API चालू करना
बेहतर मार्कर का इस्तेमाल करने से पहले, आपके पास बिलिंग खाते वाला Cloud प्रोजेक्ट और Maps JavaScript API चालू होना चाहिए. ज़्यादा जानने के लिए, Google Cloud प्रोजेक्ट सेट अप करना लेख पढ़ें.
नया मैप आईडी बनाने के लिए, Cloud को पसंद के मुताबिक बनाने में दिया गया तरीका अपनाएं.
मैप टाइप को JavaScript पर सेट करें. इसके बाद, वेक्टर या
रेस्टर में से कोई विकल्प चुनें.
मैप को शुरू करने के लिए कोड अपडेट करना
इसके लिए, आपको वह मैप आईडी डालना होगा जो आपने अभी बनाया है. यह आपको अपने Maps मैनेजमेंट पेज पर मिल सकता है.
ऐडवांस मार्कर के लिए, मैप आईडी की ज़रूरत होती है. अगर मैप आईडी मौजूद नहीं है, तो बेहतर मार्कर लोड नहीं हो सकते. समस्या हल करने के लिए, मैप की सुविधाओं में होने वाले बदलावों की सदस्यता लेने के लिए, mapcapabilities_changed लिसनर जोड़ा जा सकता है. मैप की सुविधाओं का इस्तेमाल करना ज़रूरी नहीं है. हमारा सुझाव है कि इसका इस्तेमाल सिर्फ़ जांच करने और समस्या हल करने के लिए करें. इसके अलावा, रनटाइम फ़ॉलबैक के लिए भी इसका इस्तेमाल किया जा सकता है.
// Optional: subscribe to map capability changes.map.addListener('mapcapabilities_changed',()=>{constmapCapabilities=map.getMapCapabilities();if(!mapCapabilities.isAdvancedMarkersAvailable){// Advanced markers are *not* available, add a fallback.}});
[[["समझने में आसान है","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-15 (UTC) को अपडेट किया गया."],[[["Get started with advanced markers by obtaining an API key, enabling the Maps JavaScript API, and creating a map ID."],["Update your map initialization code to include loading the advanced markers library and providing a map ID when instantiating the map."],["For testing purposes, use `DEMO_MAP_ID` as the map ID or utilize the provided example code, but replace the example map IDs for production."],["Optionally, check map capabilities to ensure advanced markers are available or to implement a fallback if they are not supported."]]],["To use advanced markers, you need a Cloud project with a billing account and the Maps JavaScript API enabled. First, obtain an API key and create a map ID, selecting JavaScript as the map type with either Vector or Raster options, or using `DEMO_MAP_ID` for testing. Update your map initialization code by loading the Maps JavaScript API and the advanced markers library. Instantiate the map with the created or demo map ID. Optionally, use a listener to check map capabilities.\n"]]