ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ui.Map.onChangeCenter
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি কলব্যাক নিবন্ধন করে যা মানচিত্র কেন্দ্র পরিবর্তিত হলে বহিস্কার করা হয়। এটি প্যান চলাকালীন বা যখন মানচিত্রের কেন্দ্র প্রোগ্রামগতভাবে পরিবর্তিত হয় তখন এটি চালানো হয়।
একটি আইডি ফেরত দেয় যা কলব্যাক নিবন্ধনমুক্ত করতে unlisten() এ পাস করা যেতে পারে।
ব্যবহার | রিটার্নস | Map. onChangeCenter (callback) | স্ট্রিং |
যুক্তি | টাইপ | বিস্তারিত | এই: ui.map | ui.মানচিত্র | ui.Map উদাহরণ। |
callback | ফাংশন | মানচিত্র কেন্দ্র পরিবর্তন হলে কলব্যাক ফায়ার। কলব্যাকটি দুটি পরামিতি অতিক্রম করেছে: একটি বস্তু যাতে নতুন কেন্দ্রের স্থানাঙ্ক রয়েছে (লন এবং ল্যাট কী সহ) এবং মানচিত্র উইজেট নিজেই। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe \u003ccode\u003eonChangeCenter\u003c/code\u003e function registers a callback that triggers when the map's center is changed, either by panning or programmatically.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns a unique ID that can be used with \u003ccode\u003eunlisten()\u003c/code\u003e to remove the registered callback.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the new center coordinates (longitude and latitude) and the map widget instance as arguments.\u003c/p\u003e\n"]]],["The `Map.onChangeCenter` function registers a callback triggered when the map's center changes, either through panning or programmatic updates. It accepts a callback function that receives the new center's coordinates (longitude and latitude) and the map widget itself as parameters. The function returns a unique string ID used to unregister the callback later. This callback is associated with a `ui.Map` instance.\n"],null,["# ui.Map.onChangeCenter\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the map center changes. This is fired during pan or when the map's center is changed programmatically.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|--------------------------------|---------|\n| Map.onChangeCenter`(callback)` | String |\n\n| Argument | Type | Details |\n|----------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.map` | ui.Map | The ui.Map instance. |\n| `callback` | Function | The callback to fire when the map center changes. The callback is passed two parameters: an object containing the coordinates of the new center (with keys lon and lat) and the map widget itself. |"]]