Adding point, line, polygon, text, and raster symbolizer constructors. This paves the way for rendering multiple symbolizers per rule. The SLD parser now successfully round-trips documents with multiple symbolizers and multiple FeatureTypeStyle elements (through the symbolizer zIndex property). The Style2 (yes, ack) constructor is used to represent a collection of rules with multiple symbolizers. Style2 objects are currently only used by the SLD parser if the multipleSymbolizer property is set to true. Future enhancements to the renderers can be made to account for multiple symbolizers. r=ahocevar (closes #2760).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10560 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
31
tests/Symbolizer.html
Normal file
31
tests/Symbolizer.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_constructor(t) {
|
||||
t.plan(2);
|
||||
|
||||
var symbolizer = new OpenLayers.Symbolizer({foo: "bar"});
|
||||
|
||||
t.ok(symbolizer instanceof OpenLayers.Symbolizer, "correct type");
|
||||
t.eq(symbolizer.foo, "bar", "constructor applies config properties");
|
||||
|
||||
}
|
||||
|
||||
function test_clone(t) {
|
||||
t.plan(2);
|
||||
|
||||
var symbolizer = new OpenLayers.Symbolizer({foo: "bar"});
|
||||
var clone = symbolizer.clone();
|
||||
|
||||
t.ok(clone instanceof OpenLayers.Symbolizer, "correct type");
|
||||
t.eq(clone.foo, "bar", "clone copies properties");
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user