PolyStyle override LineStyle on LineString
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 322
- PR merge metrics
- No merged PRs in 30d
Description
when Style have PolyStyle.outline = 0, geojson.properties['stroke-opacity'] will be 0.
but in LineString case, it should not use the PolyStyle
<?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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd http://www.google.com/kml/ext/2.2 http://code.google.com/apis/kml/schema/kml22gx.xsd">
<Document id="rcrossec">
<name>rcrossec</name>
<Snippet></Snippet>
<Folder id="FeatureLayer0">
<name>rcrossec</name>
<Snippet></Snippet>
<Placemark id="ID_00000">
<name>114000_000</name>
<Snippet></Snippet>
<description></description>
<styleUrl>#LineStyle00</styleUrl>
<MultiGeometry>
<LineString>
<extrude>0</extrude>
<altitudeMode>clampedToGround</altitudeMode>
<coordinates> 121.4214319507,25.17652710587822,0 121.4163445506372,25.16918616964401,0</coordinates>
</LineString>
</MultiGeometry>
</Placemark>
</Folder>
<Style id="LineStyle00">
<LabelStyle>
<color>00000000</color>
<scale>0.000000</scale>
</LabelStyle>
<LineStyle>
<color>ff992100</color>
<width>9.000000</width>
</LineStyle>
<PolyStyle>
<color>ff7faa55</color>
<outline>0</outline>
</PolyStyle>
</Style>
</Document>
</kml>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied KML example and trace how the converter handles LineString styles, especially PolyStyle.outline and the generated stroke-opacity property. Confirm the existing behavior with a focused test or reproduction, then ensure LineString rendering uses LineStyle rather than PolyStyle; done means the example retains the LineStyle opacity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, xml
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100