0

Python の simplekml モジュールを使用して、次の KML ファイルを作成しました。

    <?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document id="feat_1">
    <Style id="stylesel_0">
        <LabelStyle id="substyle_0">
            <color>ff0000ff</color>
            <colorMode>normal</colorMode>
            <scale>1</scale>
        </LabelStyle>
    </Style>
    <Placemark id="feat_2">
        <name>Test</name>
        <styleUrl>#stylesel_0</styleUrl>
        <Point id="geom_0">
            <coordinates>12.581811,55.682581,0.0</coordinates>
        </Point>
    </Placemark>
</Document>
</kml>

しかし、ドキュメントをインタープリターにロードすると、マーカーは割り当てられた赤色 (ff0000ff) ではなく、標準の青色として表示されます。私は何を間違っていますか?

4

1 に答える 1

1

スタイル定義でマーカーのアイコンを変更するために何もしていません。アイコンを変更するには<IconStyle>

<Style id="stylesel_0">
    <LabelStyle id="substyle_0">
        <color>ff0000ff</color>
        <colorMode>normal</colorMode>
        <scale>1</scale>
    </LabelStyle>
    <IconStyle>
        <scale>1.0</scale>
        <Icon>
           <href>http://maps.google.com/mapfiles/ms/icons/red.png</href>
        </Icon>
    </IconStyle>
</Style>
于 2015-06-12T12:32:26.127 に答える