Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
Map.remove
Stay organized with collections
Save and categorize content based on your preferences.
Removes the given item from the map, if it exists.
Returns the removed item or null if it hadn't been added to the map.
Usage | Returns | Map.remove(item) | Object |
Argument | Type | Details | item | Object | The item to remove. |
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eMap.remove()\u003c/code\u003e deletes a specific item from the map if it's present.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns the removed item, or null if the item wasn't in the map.\u003c/p\u003e\n"]]],["The `Map.remove(item)` function removes a specified item from a map. It takes one argument, `item`, which is the object intended for removal. The function returns the removed object if it was present in the map; otherwise, it returns `null`, indicating the item was not found. The return type is an Object. The function's purpose is to delete an entry if present and report its status.\n"],null,["# Map.remove\n\n\u003cbr /\u003e\n\nRemoves the given item from the map, if it exists.\n\n\u003cbr /\u003e\n\nReturns the removed item or null if it hadn't been added to the map.\n\n| Usage | Returns |\n|--------------------|---------|\n| `Map.remove(item)` | Object |\n\n| Argument | Type | Details |\n|----------|--------|---------------------|\n| `item` | Object | The item to remove. |"]]