ee.Feature.getMapId
An imperative function that returns a map ID and optional token, suitable for generating a Map overlay.
Returns an object which may be passed to ee.data.getTileUrl or ui.Map.addLayer, including an additional 'image' field, containing a Collection.draw image wrapping a FeatureCollection containing this feature. Undefined if a callback was specified.
Usage | Returns |
---|
Feature.getMapId(visParams, callback) | MapId|Object |
Argument | Type | Details |
---|
this: feature | Feature | The Feature instance. |
visParams | Object, optional | The visualization parameters. Currently only one parameter, 'color', containing an RGB color string is allowed. If visParams is not specified, black ("000000") is used. |
callback | Function, optional | An async callback. |
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-12-06 UTC.
[null,null,["Last updated 2023-12-06 UTC."],[[["Generates a Map ID and optional token for creating Map overlays using a Feature."],["Returns an object compatible with `ee.data.getTileUrl` or `ui.Map.addLayer` for visualization."],["Accepts optional visualization parameters for customizing the overlay's appearance, defaulting to black if unspecified."],["Can execute an asynchronous callback function, but in that case, the object is not returned directly."]]],["The function `Feature.getMapId` generates a map overlay ID and optional token. It returns either a `MapId` or an `Object`, which can be used with `ee.data.getTileUrl` or `ui.Map.addLayer`. The returned object includes an 'image' field with a `Collection.draw` image. The function accepts optional `visParams`, an object with a 'color' parameter (defaulting to black), and an optional asynchronous `callback` function. The input is a `Feature` instance.\n"]]