[OpenLayers-Users] SVG Cross Hatch

Ben Brehmer bbrehmer at geographicresearch.com
Tue Jun 1 20:06:45 EDT 2010


Hello,

Curios if anyone has ever been able to add a cross hatch pattern to a 
SVG vector?

I don't believe there is any support for this in OpenLayers (I'd be 
happy if I'm wrong :). I say this while looking at the documentation for 
OpenLayers.Vector.Style 
(http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Feature/Vector-js.html#OpenLayers.Feature.Vector.Constants). 


I have two schools of thought:

1. A repeating background image. The image would be a tiny, say 4px by 
4px, cross hatch icon which could be referenced in the CSS for that vector.
2. Some other SVG magic where you simply specify the particulars of the 
hatch.

I really only need some diagonals filling the inside of a polygon. But I 
assume any pattern could be created with a repeating image 
(http://mapserver.org/_images/pattern-symbol-complex.png).


Thanks,

Ben






More information about the Users mailing list