Colorizing areas based on distance from specific point

34 views
Skip to first unread message

n babb

unread,
Mar 25, 2013, 12:58:13 PM3/25/13
to kml-suppor...@googlegroups.com
Good Afternoon Everyone,
 
I am trying to build colorized polygon layers that will be based on a specific transit time from a fixed location. Is there an easier way than hand drawing the polygons?
 
Any help would be awesome.
 
Thanks

coolbawn

unread,
Mar 27, 2013, 9:09:53 AM3/27/13
to kml-suppor...@googlegroups.com


On Monday, March 25, 2013 4:58:13 PM UTC, n babb wrote:
I may be misunderstanding your problem, but it should be easy, in whatever programming language you use to generate your KML, to specify a polygon's polystyle fill color depending on the distance from the point.


If you have, say, 5 distance categories eg < 5km, 5-10, 10-20, 20-50 and >50, have a polystyle for each like
<Style id="Poly_5">
<PolyStyle>
  <color>ff0000cc</color>
</PolyStyle>
</Style>
 <Style id="Poly_10">
<PolyStyle>
  <color>ff0000dd</color>
</PolyStyle>
</Style>

and when you generate the polygon placemark, start with:

<Placemark>
  <name>xx</name>
  <styleUrl>#Poly_10</styleUrl> or  <styleUrl>#Poly_5</styleUrl> 

Sorry if I misunderstood you.
Reply all
Reply to author
Forward
0 new messages