快工助手跨境电商知识与商机助手

KML file format for v2.logistics.upload_serviceable_polygon

Shopee 官方资料 · Shopee Open Platform 常见问题(FAQ) · 适合开发者

stable本次发布有变化全部展示

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.faq
语言
en
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/help_centertopic/apitopic/developertopic/faqtopic/feature-apistopic/logistics

资料正文

§1 KML file format for v2.logistics.upload_serviceable_polygon

KML (Keyhole Markup Language) is an XML-based format used to represent geographic data (points, lines, polygons, etc.) on digital maps, similar to how JSON is used to represent structured data in web applications.

  • The uploaded KML file must conform to the specified format shown below.
  • Any additional elements or fields outside the required format are not needed and will be ignored during processing.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
 # these two rows must conform to the basic format requirements for KML
<Document>
    <Folder># supports nested structure (unlimited nesting, but not exceeding 50 levels)
        <Placemark># supports multiple entries
            <Polygon># supports multiple polygons
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                        ...(geom)
                        </coordinates>
                    </LinearRing>
                </outerBoundaryIs>
                <innerBoundaryIs># supports multiple entries (i.e., can be handled as an array)
                    <LinearRing>
                        <coordinates>
                            ...(geom)
                        </coordinates>
                    </LinearRing>
                </innerBoundaryIs>
               <innerBoundaryIs># supports multiple entries (i.e., can be handled as an array)
                    ...
                </innerBoundaryIs> 
            </Polygon>
            <Polygon>
                ...
            </Polygon>
        </Placemark>
        <Placemark>
            ...
        </Placemark>
    </Folder>
    <Folder>
        <Folder>
            ...
        </Folder>
    </Folder>
</Document>
</kml>

KML Example

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Folder>
        <Placemark>
            <Polygon>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                                    -71.93363062872307,-9.29761062798497,0 -58.92934491405756,-38.34079320968542,0 -33.20120523925071,-8.851614371504423,0 -52.27033984991114,6.385601589550155,0 -71.93363062872307,-9.29761062798497,0
                        </coordinates>
                    </LinearRing>
                </outerBoundaryIs>
            </Polygon>
        </Placemark>
    </Folder>
  </Document>
</kml>
#