From c75e16e5f2b06ddf45fd34d84ea9c208cfb59c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Wed, 3 Feb 2010 10:23:19 +0000 Subject: [PATCH] Parse the KML LabelStyle and use the color and opacity value. Create a parseKmlColor function to avoid code duplication. r=pgiraud (closes #2413) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10007 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/KML.js | 73 ++++++++++++++++++++++-------------- tests/Format/KML.html | 8 ++++ 2 files changed, 53 insertions(+), 28 deletions(-) diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index 200d451502..b98d18f912 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -277,13 +277,38 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { for(var i=0, len=nodes.length; i node and builds the style hash @@ -296,7 +321,8 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { parseStyle: function(node) { var style = {}; - var types = ["LineStyle", "PolyStyle", "IconStyle", "BalloonStyle"]; + var types = ["LineStyle", "PolyStyle", "IconStyle", "BalloonStyle", + "LabelStyle"]; var type, nodeList, geometry, parser; for(var i=0, len=types.length; i