Stylizing KML file

Skip to first unread message


May 25, 2015, 8:48:39 PM5/25/15
I was wondering how I can stylize the colour of a KML file that has polygons in it. Can I stylize it using the following code? If so, how? (My ultimate goal is to add this KML file to a google map with the custom styling I have applied).



barryhunter (KML Guru)

May 26, 2015, 1:20:28 PM5/26/15
That tag would have to be added to every feature (usually a <Placemark>) for it to apply. 

Have to be careful if there is already a <Style> on the feature, its more complicated as need to merge them. 

Also if the feature is already using a <styleUrl> then it might be overridden from a specific referenced style. If all using a common style could just update that common style. 

... to be honest, unless you very familiaer with KML editing, its probably going to be easier to just update the style once you've imported the KML. It sounds like you want to do all features in the layer anyway. (or could even use Google Earth. It has a 'Share Style' option) 

Reply all
Reply to author
0 new messages