SLD maps minScaleDenominator and maxScaleDenominator to rule minScale and maxScale. r=tschaub (closes #1297)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-02-01 21:17:12 +00:00
parent 9bb51fb088
commit 4fc4c6ce4b
6 changed files with 111 additions and 44 deletions

View File

@@ -28,9 +28,7 @@
// create a property style that reads the externalGraphic url from
// the thumbail attribute of the rss item
style = new OpenLayers.Style({
externalGraphic: "${thumbnail}",
pointRadius: 20});
style = new OpenLayers.Style({externalGraphic: "${thumbnail}"});
// create a rule with a point symbolizer that will make the thumbnail
// larger if the title of the rss item conatins "powder"
@@ -41,7 +39,11 @@
symbolizer: {"Point": {pointRadius: 30}}});
rule.value2regex("*");
style.addRules([rule]);
// If the above rule does not apply, use a smaller pointRadius.
var elseRule = new OpenLayers.Rule({
symbolizer: {"Point": {pointRadius: 20}}});
style.addRules([rule, elseRule]);
markerLayer = new OpenLayers.Layer.Vector("", {style: style});
map.addLayer(markerLayer);

View File

@@ -51,6 +51,12 @@
</sld:Stroke>
</sld:PolygonSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:Name>testRuleNameElse</sld:Name>
<sld:Title>title</sld:Title>
<sld:Abstract>Abstract</sld:Abstract>
<ogc:ElseFilter/>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
@@ -113,7 +119,12 @@
</sld:Stroke>
</sld:PolygonSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:Name>testRuleNameHoverElse</sld:Name>
<sld:Title>title</sld:Title>
<sld:Abstract>Abstract</sld:Abstract>
<ogc:ElseFilter/>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>