Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.FeatureCollection.getMapId
Stay organized with collections
Save and categorize content based on your preferences.
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 | FeatureCollection.getMapId(visParams, callback) | MapId|Object |
Argument | Type | Details | this: featurecollection | FeatureCollection | The FeatureCollection 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."],[[["\u003cp\u003e\u003ccode\u003eFeatureCollection.getMapId()\u003c/code\u003e generates a map ID and optional token for creating map overlays using FeatureCollections.\u003c/p\u003e\n"],["\u003cp\u003eIt returns an object usable with \u003ccode\u003eee.data.getTileUrl\u003c/code\u003e or \u003ccode\u003eui.Map.addLayer\u003c/code\u003e for adding the FeatureCollection to a map.\u003c/p\u003e\n"],["\u003cp\u003eVisualization parameters, like color, can be customized; if unspecified, the default color is black.\u003c/p\u003e\n"],["\u003cp\u003eAn optional callback function can be provided for asynchronous operations.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.getMapId\n\n\u003cbr /\u003e\n\nAn imperative function that returns a map ID and optional token, suitable for generating a Map overlay.\n\n\u003cbr /\u003e\n\nReturns 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.\n\n| Usage | Returns |\n|------------------------------------------------------------|---------------|\n| FeatureCollection.getMapId`(`*visParams* `, `*callback*`)` | MapId\\|Object |\n\n| Argument | Type | Details |\n|---------------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `featurecollection` | FeatureCollection | The FeatureCollection instance. |\n| `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. |\n| `callback` | Function, optional | An async callback. |"]]