在Google地球中更改地图样式

时间:2014-02-24 20:49:59

标签: kml google-earth

我在Google地球中添加了一个美国县地图。我已经在qgis中制作了地图并导出为KML,但是当我在Google地球中打开它时,县边界变得非常厚。当我试图改变它时,它使所有的边界和县的价值统一,并带走了氯行为。如何更改Google地球中的边框等个别样式?

以下是代表性的KML:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
    <Document>
        <name>geo_county_ma</name>
        <Style id="style3">
            <LineStyle>
                <color>40000000</color>
                <width>3</width>
            </LineStyle>
            <PolyStyle>
                <color>ffe7d1af</color>
            </PolyStyle>
        </Style>
        <Style id="style2">
            <LineStyle>
                <color>40000000</color>
                <width>3</width>
            </LineStyle>
            <PolyStyle>
                <color>fff4e6d7</color>
            </PolyStyle>
        </Style>

        <Placemark>
            <styleUrl>#style3</styleUrl>
            <Polygon>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                        -122.4361217223626,37.80089762963801 -122.431353047545,37.80152776851571 -122.4317440301943,37.80336276723568 -122.436466590289,37.80271696430888 -122.4361217223626,37.80089762963801 
                    </coordinates>
                    </LinearRing>
                </outerBoundaryIs>
            </Polygon>
        </Placemark>

        <Placemark>
            <styleUrl>#style2</styleUrl>
            <Polygon>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                -122.436124895585,37.80088925120538 -122.4313590833908,37.80150407165125 -122.4310083235047,37.79963224033016 -122.435667004224,37.79900507682146 -122.436124895585,37.80088925120538
            </coordinates>
                    </LinearRing>
                </outerBoundaryIs>
            </Polygon>
        </Placemark>
    </Document>
</kml>

1 个答案:

答案 0 :(得分:0)

如果多边形的线条/边框太粗,请尝试将LineStyle的宽度值更改为1(或2),无论哪种效果最佳:

        <LineStyle>
            <color>40000000</color>
            <width>1</width>
        </LineStyle>

您可以在每个地标上单击鼠标右键并手动更改Google地球中的样式线宽,但建议您在文本编辑器中更改KML,并使用<width>3</width>全局替换<width>1</width>