ee.ImageCollection.style
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
วาดคอลเล็กชันเวกเตอร์เพื่อการแสดงภาพโดยใช้ภาษาการจัดรูปแบบที่เรียบง่าย
การใช้งาน | การคืนสินค้า |
---|
ImageCollection.style(color, pointSize, pointShape, width, fillColor, styleProperty, neighborhood, lineType) | รูปภาพ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ collection | FeatureCollection | คอลเล็กชันที่จะวาด |
color | สตริง ค่าเริ่มต้น: "black" | สีเริ่มต้น (ค่าสี CSS 3.0 เช่น 'FF0000' หรือ 'red') เพื่อใช้ในการวาดฟีเจอร์ รองรับความทึบแสง (เช่น 'FF000088' สำหรับสีแดงโปร่งใส 50%) |
pointSize | จำนวนเต็ม ค่าเริ่มต้น: 3 | ขนาดเริ่มต้นของเครื่องหมายจุดในหน่วยพิกเซล |
pointShape | String, ค่าเริ่มต้น: "circle" | รูปร่างเริ่มต้นของเครื่องหมายที่จะวาดที่ตำแหน่งจุดแต่ละจุด ค่าใดค่าหนึ่งต่อไปนี้ `circle`, `square`, `diamond`, `cross`, `plus`, `pentagram`, `hexagram`, `triangle`, `triangle_up`, `triangle_down`, `triangle_left`, `triangle_right`, `pentagon`, `hexagon`, `star5`, `star6` อาร์กิวเมนต์นี้ยังรองรับตัวย่อเครื่องหมาย Matlab ต่อไปนี้ด้วย `o`, `s`, `d`, `x`, `+`, `p`, `h`, `^`, `v`, `<`, `>` |
width | Float ค่าเริ่มต้น: 2 | ความกว้างของเส้นเริ่มต้นสำหรับเส้นและเส้นขอบสำหรับรูปหลายเหลี่ยมและรูปร่างจุด |
fillColor | สตริง ค่าเริ่มต้น: null | สีสำหรับเติมรูปหลายเหลี่ยมและรูปร่างจุด ค่าเริ่มต้นคือ "สี" ที่ความทึบแสง 0.66 |
styleProperty | สตริง ค่าเริ่มต้น: null | พร็อพเพอร์ตี้ต่อฟีเจอร์ที่คาดว่าจะมีพจนานุกรม ค่าในพจนานุกรมจะลบล้างค่าเริ่มต้นของฟีเจอร์นั้น |
neighborhood | จำนวนเต็ม ค่าเริ่มต้น: 5 | หากใช้ styleProperty และฟีเจอร์ใดมี pointSize หรือความกว้างมากกว่าค่าเริ่มต้น อาจเกิดอาร์ติแฟกต์การแบ่งไทล์ ระบุขอบเขตสูงสุด (pointSize + width) ที่จำเป็นสำหรับฟีเจอร์ |
lineType | สตริง ค่าเริ่มต้น: "solid" | รูปแบบเส้นเริ่มต้นสำหรับเส้นและเส้นขอบของรูปหลายเหลี่ยมและรูปร่างจุด ค่าเริ่มต้นคือ "solid" ข้อใดข้อหนึ่ง: ทึบ จุด ประ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eVisualize vector collections (FeatureCollections) by applying styles like color, size, and shape to their features.\u003c/p\u003e\n"],["\u003cp\u003eCustomize the appearance of points, lines, and polygons with parameters such as point size, shape, line width, and fill color.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003estyleProperty\u003c/code\u003e parameter to define individual styles for each feature within the collection.\u003c/p\u003e\n"],["\u003cp\u003eControl potential tiling artifacts by setting the \u003ccode\u003eneighborhood\u003c/code\u003e parameter, especially when using large point sizes or widths.\u003c/p\u003e\n"],["\u003cp\u003eAdjust the default line style for lines and outlines with the \u003ccode\u003elineType\u003c/code\u003e parameter, choosing between solid, dotted, and dashed options.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.style\n\nDraw a vector collection for visualization using a simple style language.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| ImageCollection.style`(`*color* `, `*pointSize* `, `*pointShape* `, `*width* `, `*fillColor* `, `*styleProperty* `, `*neighborhood* `, `*lineType*`)` | Image |\n\n| Argument | Type | Details |\n|--------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | FeatureCollection | The collection to draw. |\n| `color` | String, default: \"black\" | A default color (CSS 3.0 color value e.g., 'FF0000' or 'red') to use for drawing the features. Supports opacity (e.g., 'FF000088' for 50% transparent red). |\n| `pointSize` | Integer, default: 3 | The default size in pixels of the point markers. |\n| `pointShape` | String, default: \"circle\" | The default shape of the marker to draw at each point location. One of: \\`circle\\`, \\`square\\`, \\`diamond\\`, \\`cross\\`, \\`plus\\`, \\`pentagram\\`, \\`hexagram\\`, \\`triangle\\`, \\`triangle_up\\`, \\`triangle_down\\`, \\`triangle_left\\`, \\`triangle_right\\`, \\`pentagon\\`, \\`hexagon\\`, \\`star5\\`, \\`star6\\`. This argument also supports these Matlab marker abbreviations: \\`o\\`, \\`s\\`, \\`d\\`, \\`x\\`, \\`+\\`, \\`p\\`, \\`h\\`, \\`\\^\\`, \\`v\\`, \\`\\\u003c\\`, \\`\\\u003e\\`. |\n| `width` | Float, default: 2 | The default line width for lines and outlines for polygons and point shapes. |\n| `fillColor` | String, default: null | The color for filling polygons and point shapes. Defaults to 'color' at 0.66 opacity. |\n| `styleProperty` | String, default: null | A per-feature property expected to contain a dictionary. Values in the dictionary override any default values for that feature. |\n| `neighborhood` | Integer, default: 5 | If styleProperty is used and any feature has a pointSize or width larger than the defaults, tiling artifacts can occur. Specifies the maximum neighborhood (pointSize + width) needed for any feature. |\n| `lineType` | String, default: \"solid\" | The default line style for lines and outlines of polygons and point shapes. Defaults to 'solid'. One of: solid, dotted, dashed. |"]]