ภาพรวม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การจัดรูปแบบตามข้อมูลสำหรับขอบเขตช่วยให้คุณเข้าถึงรูปหลายเหลี่ยมของ Google สำหรับ
ขอบเขตการบริหาร จัดรูปแบบรูปหลายเหลี่ยมของขอบเขต และแสดงรูปหลายเหลี่ยมเหล่านั้นบน
แผนที่ได้
การจัดรูปแบบตามข้อมูลสำหรับขอบเขตช่วยให้คุณกำหนดเป้าหมายภูมิภาคตามรหัสสถานที่ และใช้
การจัดรูปแบบที่กำหนดเองกับรูปหลายเหลี่ยมของขอบเขตบนแผนที่ได้ ฟีเจอร์แต่ละประเภทแสดงถึง
ประเภทภูมิภาค คุณเลือกได้ว่าจะเปิดใช้ฟีเจอร์ประเภทใดเมื่อกำหนดค่ารูปแบบแผนที่
ดูขอบเขตที่ Google ครอบคลุมเพื่อดูขอบเขตที่ครอบคลุมในแต่ละประเทศ
ประเภทฟีเจอร์
การจัดรูปแบบตามข้อมูลช่วยให้เข้าถึงขอบเขตของ Google สำหรับประเภทฟีเจอร์ที่
แสดงถึงเขตบริหาร พื้นที่การบริหารจะจัดหมวดหมู่ตาม
ฟังก์ชัน เช่น ประเทศ รัฐ ท้องถิ่น และรหัสไปรษณีย์ ประเภทฟีเจอร์
จะจัดเรียงตามระดับการบริหาร ซึ่งโครงสร้างจะแตกต่างกันไปในแต่ละประเทศ
ซึ่งได้แก่
GMSFeatureTypeCountry
— หน่วยงานทางการเมืองระดับประเทศ ซึ่งโดยทั่วไปจะเป็นประเภทคำสั่งซื้อระดับสูงสุด
GMSFeatureTypeAdministrativeAreaLevel1
- หน่วยงานพลเรือนระดับที่ 1 ที่ต่ำกว่าระดับประเทศ ในสหรัฐอเมริกา ระดับการบริหารเหล่านี้คือรัฐ
GMSFeatureTypeAdministrativeAreaLevel2
— หน่วยงานพลเรือนระดับที่ 2 ที่ต่ำกว่าระดับประเทศ ในสหรัฐอเมริกา ระดับการบริหารเหล่านี้คือเทศมณฑล
GMSFeatureTypeLocality
— หน่วยงานทางการเมืองของเมืองหรือเทศบาลที่จดทะเบียน
GMSFeatureTypePostalCode
— รหัสไปรษณีย์ที่ใช้ในการส่งจดหมายภายในประเทศ
GMSFeatureTypeSchoolDistrict
— เขตการศึกษา รวมถึงเขตการศึกษาแบบรวม เขตการศึกษาประถมศึกษา และเขตการศึกษามัธยมศึกษา
พื้นที่การปกครองจะแสดงในแผนที่เป็นชั้นฟีเจอร์ โดยแต่ละประเภทจะมี
เลเยอร์ของตัวเอง เปิดใช้เลเยอร์ฟีเจอร์ต่อรูปแบบแผนที่ คุณเลือกเลเยอร์ฟีเจอร์ที่จะเปิดใช้ได้เมื่อตั้งค่ารูปแบบแผนที่ใน Google Cloud Console
กำหนดรูปแบบรูปหลายเหลี่ยมขอบเขต
คุณสามารถใช้รูปแบบกับรูปหลายเหลี่ยมขอบเขตสำหรับการเติม (สี ความทึบแสง) และเส้นขอบ
(สี ความทึบแสง น้ำหนักของเส้นขอบ) ใช้การจัดรูปแบบเพื่อทำสิ่งต่อไปนี้
- จัดรูปแบบรูปหลายเหลี่ยมขอบเขตหรือแสดงขอบเขตทั้งหมดสำหรับประเภทฟีเจอร์
- สร้างแผนที่โคโรเพลท
ความครอบคลุมของขอบเขตของ Google แสดงความพร้อมใช้งานของฟีเจอร์
ประเภทต่างๆ ในแต่ละประเทศ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eData-driven styling enables applying custom styles to Google's administrative boundary polygons on your maps, targeting regions by place ID.\u003c/p\u003e\n"],["\u003cp\u003eYou can select specific feature types like countries, states, localities, and postal codes to display on your map.\u003c/p\u003e\n"],["\u003cp\u003eBoundary polygons can be styled with fill and stroke properties to create visual effects or choropleth maps.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides boundary data for various countries, and coverage details are available in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eData-driven styling is available across Android, iOS, and JavaScript platforms.\u003c/p\u003e\n"]]],["Data-driven styling allows accessing and styling Google's administrative boundary polygons on maps. Users can target regions by place ID and apply custom styling to the polygons. Feature types, categorized by administrative level (e.g., country, state, locality, postal code, school district), are accessed via layers within map styles. Styling options include fill color and opacity, as well as stroke color, opacity, and weight, enabling the creation of choropleth maps or individual boundary styles. Availability of these feature types varies by country.\n"],null,["Select platform: [Android](/maps/documentation/android-sdk/dds-boundaries/overview \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/dds-boundaries/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/dds-boundaries/overview \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nData-driven styling for boundaries lets you access Google's polygons for\nadministrative boundaries, apply styling to boundary polygons, display them on\nyour maps.\n\nData-driven styling for boundaries lets you target regions by place ID, and apply\ncustom styling to boundary polygons on the map. Each feature type represents a\ntype of region; you select which feature types to enable when configuring a map\nstyle. Consult [Google boundaries coverage](/maps/documentation/ios-sdk/dds-boundaries/coverage) to see per-country\nboundary coverage.\n\nFeature types\n\nData-driven styling provides access to Google boundaries for feature types that\nrepresent administrative areas. Administrative areas are categorized by\nfunction, for example country, state, locality, and postal code. Feature types\nare arranged by administrative level, the structure of which varies by country.\nThese include:\n\n- `GMSFeatureTypeCountry` --- The national political entity, typically the highest order type.\n- `GMSFeatureTypeAdministrativeAreaLevel1` - A first-order civil entity below the country level. Within the United States, these administrative levels are states.\n- `GMSFeatureTypeAdministrativeAreaLevel2` --- A second-order civil entity below the country level. Within the United States, these administrative levels are counties.\n- `GMSFeatureTypeLocality` --- An incorporated city or town political entity.\n- `GMSFeatureTypePostalCode` --- A postal code, as used to address postal mail within the country.\n- `GMSFeatureTypeSchoolDistrict` --- A school district; includes unified, elementary, and secondary.\n\nAdministrative areas are represented on the map as feature layers; each type has\nits own layer. Feature layers are enabled per map style. You can choose which\nfeature layers to enable when setting up your map style in the\nGoogle Cloud console.\n\nStyle boundary polygons\n\nYou can apply styles to boundary polygons for fill (color, opacity), and stroke\n(color, opacity, stroke weight). Use styling to:\n\n- Style a boundary polygon or show all the boundaries for a feature type.\n- Create a choropleth map.\n\n[Google boundaries coverage](/maps/documentation/ios-sdk/dds-boundaries/coverage) shows per-country availability of feature\ntypes."]]