blockly > MarkerManager > getMarker
MarkerManager.getMarker() 方法
取得與指定 ID 對應的單一標記。
Signature:
getMarker(id: string): Marker | null;
參數
傳回:
Marker | null
與指定 ID 對應的標記,如果不存在則為空值。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-15 (世界標準時間)。
[null,null,["上次更新時間:2024-10-15 (世界標準時間)。"],[[["The `getMarker()` method retrieves a specific marker object associated with a unique ID from the MarkerManager."],["If a marker with the given ID exists, the method returns the corresponding Marker object; otherwise, it returns null."],["The method requires a single parameter: a string representing the unique identifier of the target marker."]]],["The `getMarker` method retrieves a specific marker using its unique ID. It accepts a string `id` as input. The method searches for a marker matching the provided ID. If a matching marker is found, it is returned as a `Marker` object. If no marker matches the ID, the method returns `null`. This function allows users to access a single marker from a collection managed by `MarkerManager`.\n"]]