* added stroke, fill and graphic symbolizer properties (all boolean) to

control whether or not to render a stroke, fill and graphic.
 * added a defaultsPerSymbolizer property to OpenLayers.Style to allow 
for extending incomplete symbolizers with defaults for stroke, fill or 
graphic. This also makes Format.SLD read/write round trips possible 
without modifying empty or incomplete <Stroke/>, <Fill/> and <Graphic/> 
constructs. r=tschaub (closes #1876)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9278 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-04-13 13:35:13 +00:00
parent 13e42ec59b
commit 2aa7f22926
7 changed files with 327 additions and 45 deletions
+10 -2
View File
@@ -661,12 +661,20 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
OpenLayers.Util.applyDefaults(style, this.minimumSymbolizer);
var options = {
'isFilled': true,
'isStroked': !!style.strokeWidth
'isFilled': style.fill === undefined ?
true :
style.fill,
'isStroked': style.stroke === undefined ?
!!style.strokeWidth :
style.stroke
};
var drawn;
switch (geometry.CLASS_NAME) {
case "OpenLayers.Geometry.Point":
if(style.graphic === false) {
options.isFilled = false;
options.isStroked = false;
}
drawn = this.drawPoint(node, geometry);
break;
case "OpenLayers.Geometry.LineString":