From 7d3d6151727a51d5aa70fb710247bac44740dfa1 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 30 Jul 2008 14:53:24 +0000 Subject: [PATCH] Fix for Inline KML styles extracted even though extractStyles is false, from Edgemaster. r=me, tests=me, (Closes #1576) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7607 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/KML.js | 24 +++++++++++++----------- tests/Format/KML.html | 7 +++++++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index 57881a9a70..c273622706 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -541,17 +541,19 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { feature.style = this.getStyle(feature.attributes.styleUrl); } - // Make sure that -112,36 -113,37 '; function test_Format_KML_constructor(t) { t.plan(4); @@ -117,6 +118,12 @@ t.eq(output, expected, "multilinestring correctly written"); } + function test_Format_KML_extractStyle(t) { + t.plan(1); + var f = new OpenLayers.Format.KML(); + var features = f.read(test_style); + t.ok(features[0].style == undefined, "KML Feature has no style with extractStyle false"); + }