Stay organized with collections
Save and categorize content based on your preferences.
blockly > MarkerManager > getMarker
MarkerManager.getMarker() method
Get a single marker that corresponds to the given ID.
Signature:
getMarker(id: string): Marker | null;
Parameters
Parameter |
Type |
Description |
id |
string |
A unique identifier for the marker. |
Returns:
Marker | null
The marker that corresponds to the given ID, or null if none exists.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egetMarker()\u003c/code\u003e method retrieves a specific marker object associated with a unique ID from the MarkerManager.\u003c/p\u003e\n"],["\u003cp\u003eIf a marker with the given ID exists, the method returns the corresponding Marker object; otherwise, it returns null.\u003c/p\u003e\n"],["\u003cp\u003eThe method requires a single parameter: a string representing the unique identifier of the target marker.\u003c/p\u003e\n"]]],["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"],null,["[blockly](./blockly.md) \\\u003e [MarkerManager](./blockly.markermanager_class.md) \\\u003e [getMarker](./blockly.markermanager_class.getmarker_1_method.md)\n\nMarkerManager.getMarker() method\n--------------------------------\n\nGet a single marker that corresponds to the given ID.\n\n**Signature:** \n\n getMarker(id: string): Marker | null;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|--------|-------------------------------------|\n| id | string | A unique identifier for the marker. |\n\n**Returns:**\n\n[Marker](./blockly.marker_class.md) \\| null\n\nThe marker that corresponds to the given ID, or null if none exists."]]