Stroke style of features can now be specified. Both SVG's
stroke-dasharray and VML's dashstyle properties are allowed in the new strokeDashstyle symbolizer property. For VML, which does not support custom dash styles, one of the 5 matching pre-defined dash styles will be guessed. The patch also adds support for the stroke-dasharray property in SLD. r=crschmidt (closes #1126) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -407,6 +407,23 @@
|
||||
t.ok(r.symbolSize["-square"], "Symbol size cached correctly.");
|
||||
}
|
||||
|
||||
function test_svg_dashstyle(t) {
|
||||
if (!OpenLayers.Renderer.SVG.prototype.supported()) {
|
||||
t.plan(0);
|
||||
return;
|
||||
}
|
||||
|
||||
t.plan(5);
|
||||
|
||||
var r = new OpenLayers.Renderer.SVG(document.body);
|
||||
|
||||
t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dot"}, 1), "1,4", "dot dasharray created correctly");
|
||||
t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dash"}, 1), "4,4", "dash dasharray created correctly");
|
||||
t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "longdash"}, 1), "8,4", "longdash dasharray created correctly");
|
||||
t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dashdot"}, 1), "4,4,1,4", "dashdot dasharray created correctly");
|
||||
t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "longdashdot"}, 1), "8,4,1,4", "dashdot dasharray created correctly");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user