ee.Feature.getMapId
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
פונקציה אימפרטיבית שמחזירה מזהה מפה וטוקן אופציונלי, שמתאימים ליצירת שכבת-על של מפה.
הפונקציה מחזירה אובייקט שאפשר להעביר לפונקציה ee.data.getTileUrl או לפונקציה ui.Map.addLayer, כולל שדה נוסף image שמכיל תמונה של Collection.draw שעוטפת FeatureCollection שמכילה את התכונה הזו. אם צוינה קריאה חוזרת (callback), הערך לא מוגדר.
שימוש | החזרות |
---|
Feature.getMapId(visParams, callback) | MapId|Object |
ארגומנט | סוג | פרטים |
---|
זה: feature | תכונה | מופע התכונה. |
visParams | אובייקט, אופציונלי | פרמטרים של התצוגה החזותית. בשלב הזה מותר להשתמש רק בפרמטר אחד, color, שמכיל מחרוזת של צבע RGB. אם לא מציינים את visParams, המערכת משתמשת בצבע שחור ("000000"). |
callback | פונקציה, אופציונלי | התקשרות חזרה אסינכרונית. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eGenerates a Map ID and optional token for creating Map overlays using a Feature.\u003c/p\u003e\n"],["\u003cp\u003eReturns an object compatible with \u003ccode\u003eee.data.getTileUrl\u003c/code\u003e or \u003ccode\u003eui.Map.addLayer\u003c/code\u003e for visualization.\u003c/p\u003e\n"],["\u003cp\u003eAccepts optional visualization parameters for customizing the overlay's appearance, defaulting to black if unspecified.\u003c/p\u003e\n"],["\u003cp\u003eCan execute an asynchronous callback function, but in that case, the object is not returned directly.\u003c/p\u003e\n"]]],["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"],null,["# ee.Feature.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| Feature.getMapId`(`*visParams* `, `*callback*`)` | MapId\\|Object |\n\n| Argument | Type | Details |\n|-----------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `feature` | Feature | The Feature 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. |"]]