উন্নত মার্কারগুলির সাথে সেট আপ করতে এই পদক্ষেপগুলি অনুসরণ করুন৷
একটি API কী পান এবং মানচিত্র জাভাস্ক্রিপ্ট API সক্ষম করুন৷
উন্নত মার্কার ব্যবহার করার আগে, আপনার একটি বিলিং অ্যাকাউন্ট সহ একটি ক্লাউড প্রজেক্ট এবং মানচিত্র জাভাস্ক্রিপ্ট API সক্ষম করা প্রয়োজন৷ আরও জানতে, আপনার Google ক্লাউড প্রকল্প সেট আপ দেখুন।
একটি নতুন মানচিত্র ID তৈরি করতে, ক্লাউড কাস্টমাইজেশনের ধাপগুলি অনুসরণ করুন৷ জাভাস্ক্রিপ্টে মানচিত্রের ধরন সেট করুন এবং ভেক্টর বা রাস্টার বিকল্পটি নির্বাচন করুন।
আপনার মানচিত্র প্রারম্ভিক কোড আপডেট করুন
এর জন্য আপনার তৈরি করা মানচিত্র ID প্রয়োজন। এটি আপনার মানচিত্র ব্যবস্থাপনা পৃষ্ঠায় পাওয়া যাবে।
ম্যাপ mapId প্রপার্টি ব্যবহার করে ম্যাপ ইনস্ট্যান্টিয়েট করার সময় একটি ম্যাপ আইডি প্রদান করুন। এটি আপনার প্রদান করা একটি মানচিত্র ID বা DEMO_MAP_ID হতে পারে।
উন্নত মার্কারগুলির একটি মানচিত্র আইডি প্রয়োজন৷ মানচিত্র ID অনুপস্থিত থাকলে, উন্নত মার্কার লোড করতে পারবে না। একটি সমস্যা সমাধানের পদক্ষেপ হিসাবে, আপনি মানচিত্র ক্ষমতা পরিবর্তনের সদস্যতা নিতে একটি 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.}});
[null,null,["2025-08-15 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eGet started with advanced markers by obtaining an API key, enabling the Maps JavaScript API, and creating a map ID.\u003c/p\u003e\n"],["\u003cp\u003eUpdate your map initialization code to include loading the advanced markers library and providing a map ID when instantiating the map.\u003c/p\u003e\n"],["\u003cp\u003eFor testing purposes, use \u003ccode\u003eDEMO_MAP_ID\u003c/code\u003e as the map ID or utilize the provided example code, but replace the example map IDs for production.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, check map capabilities to ensure advanced markers are available or to implement a fallback if they are not supported.\u003c/p\u003e\n"]]],["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"],null,["Select platform: [Android](/maps/documentation/android-sdk/advanced-markers/start \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/advanced-markers/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/advanced-markers/start \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nFollow these steps to get set up with advanced markers.\n\nGet an API key and enable the Maps JavaScript API\n\nBefore using advanced markers, you need a Cloud\nproject with a billing account, and the Maps JavaScript API\nenabled. To learn more, see [Set up your Google Cloud project](/maps/documentation/javascript/cloud-setup).\n\n[Get an API key](/maps/documentation/javascript/get-api-key)\n\nCreate a map ID\n\nTo create a new [map ID](/maps/documentation/get-map-id), follow the steps in\n[Cloud customization](/maps/documentation/javascript/maps-customization-overview).\nSet the Map type to **JavaScript** , and select either the **Vector** or\n**Raster** option.\n| **Important:** For testing, you can skip the step of creating and configuring a map ID, by using `mapId: 'DEMO_MAP_ID'` in your app code.\n\nUpdate your map initialization code\n\nThis requires the map ID you just created. It can be found on your [Maps\nManagement](https://console.cloud.google.com/google/maps-apis/studio/maps) page.\n\n1. [Load the Maps JavaScript API](/maps/documentation/javascript/load-maps-js-api).\n\n2. Load the advanced markers library from within an `async`\n function when needed:\n\n ```javascript\n const { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\") as google.maps.MarkerLibrary;\n ```\n3. Provide a map ID when you instantiate the map using the `mapId` property.\n This can be a map ID that you provide, or `DEMO_MAP_ID`.\n\n ```javascript\n const map = new\n google.maps.Map(document.getElementById('map'), {\n center: {lat: -34.397, lng: 150.644},\n zoom: 8,\n mapId: 'YOUR_MAP_ID'\n });\n ```\n\n| **Caution:** The example maps for advanced markers use map IDs that are linked to a reduced-POI map style. If you re-use example code, we recommend replacing these map IDs with `DEMO_MAP_ID`, or with your own map ID.\n\nCheck map capabilities (optional)\n\nAdvanced markers requires a map ID. If the map ID is missing,\nadvanced markers cannot load. As a troubleshooting step,\nyou can add a `mapcapabilities_changed` listener to subscribe to map capability\nchanges. Using Map Capabilities is optional, and recommended only for testing\nand troubleshooting purposes, or for runtime fallback purposes. \n\n```javascript\n// Optional: subscribe to map capability changes.\nmap.addListener('mapcapabilities_changed', () =\u003e {\n const mapCapabilities = map.getMapCapabilities();\n\n if (!mapCapabilities.isAdvancedMarkersAvailable) {\n // Advanced markers are *not* available, add a fallback.\n }\n});\n```\n\nNext steps\n\n[Create a default advanced marker](/maps/documentation/javascript/advanced-markers/add-marker)"]]