Stay organized with collections
Save and categorize content based on your preferences.
Maps an algorithm over a collection.
Returns the mapped collection.
Usage
Returns
FeatureCollection.map(algorithm, dropNulls)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
algorithm
Function
The operation to map over the images or features of the collection. A JavaScript function that receives an image or features and returns one. The function is called only once and the result is captured as a description, so it cannot perform imperative operations or rely on external state.
dropNulls
Boolean, optional
If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped.
[[["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 2023-10-06 UTC."],[[["`map()` iterates over a FeatureCollection, applying a user-defined function to each feature."],["The provided function transforms features and returns modified versions, creating a new FeatureCollection."],["`map()` allows adding/modifying properties of features within a FeatureCollection or performing calculations based on existing properties."],["An optional `dropNulls` parameter controls whether features resulting in null from the mapping function are retained in the output."]]],[]]