[fusion-commits] r2072 - trunk/widgets/Theme/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Feb 17 13:35:21 EST 2010
Author: madair
Date: 2010-02-17 13:35:20 -0500 (Wed, 17 Feb 2010)
New Revision: 2072
Modified:
trunk/widgets/Theme/classes/theme.php
Log:
re #325: remove other scale ranges when creating a theme layer
Modified: trunk/widgets/Theme/classes/theme.php
===================================================================
--- trunk/widgets/Theme/classes/theme.php 2010-02-11 21:14:09 UTC (rev 2071)
+++ trunk/widgets/Theme/classes/theme.php 2010-02-17 18:35:20 UTC (rev 2072)
@@ -233,9 +233,17 @@
$doc = DOMDocument::loadXML($byteReader->ToString());
$version = $doc->documentElement->getAttribute('version');
$template = 'templates/arearuletemplate-'.$version.'.xml';
- $nodeList = $doc->getElementsByTagName('VectorScaleRange');
+ $layerDefList = $doc->getElementsByTagName('VectorLayerDefinition');
+ $layerDef = $layerDefList->item(0);
+ $nodeList = $layerDef->getElementsByTagName('VectorScaleRange');
$vectorScaleRangecElement = $nodeList->item($this->args['SCALERANGEINDEX']);
+ $listLength = $nodeList->length;
+ for($index = 0; $index < $listLength; $index++)
+ {
+ $layerDef->removeChild($nodeList->item(0));
+ }
+ $layerDef->appendChild($vectorScaleRangecElement);
$areaTypeStyle = $vectorScaleRangecElement->getElementsByTagName('AreaTypeStyle')->item(0);
// Remove any existing <AreaRule> elements.
More information about the fusion-commits
mailing list