Is there such thing as a "pattern fill" in KML? For instance, I would
like to be able to fill a polygon with a diagonal line pattern, but so
far have only been able to figure out how to fill with an rgb. Anyone
have any suggestions/tips/comments?
Thanks.
No, not an option at this stage (unless you want to draw the lines
yourself!). You could look at using different levels of opacity to
give it a bit more variation. Other than that, it would have to be an
image overlay.
:-)
Simon.
You can try creating your pattern from geometric primitives if it's
not too complex. That would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Placemark>
<name>Pattern fill</name>
<Style>
<LineStyle>
<color>ff008000</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>ff00ffff</color>
</PolyStyle>
</Style>
<MultiGeometry>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>-2,-2 2,-2 2,2 -2,2 -2,-2</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
<LineString>
<coordinates>-2,-1 -1,-2</coordinates>
</LineString>
<LineString>
<coordinates>-2,0 0,-2</coordinates>
</LineString>
<LineString>
<coordinates>-2,1 1,-2</coordinates>
</LineString>
<LineString>
<coordinates>-2,2 2,-2</coordinates>
</LineString>
<LineString>
<coordinates>-1,2 2,-1</coordinates>
</LineString>
<LineString>
<coordinates>0,2 2,0</coordinates>
</LineString>
<LineString>
<coordinates>1,2 2,1</coordinates>
</LineString>
</MultiGeometry>
</Placemark>
</kml>
Another option is a ground overlay with the pattern.
Jonathan
I'll take a look into the ground overlay, but again, with the dynamic
polygon shapes that are being produced, I have a feeling it might skew
the image a little bit too much.
Any other ideas floating out there?