[OpenLayers-Users] Vector Layer Rendering

Andreas Neumann a.neumann at carto.net
Thu May 26 03:19:15 EDT 2011


 Hi Sam,

 There are different vector rendering technologies: SVG, VML, Canvas, 
 Flash, Silverlight, PDF, etc. As far as I know, OL supports SVG, VML and 
 canvas. Depending on the browsers it will decide which technology it 
 will use: IE6 to IE8 will render with VML, all other browsers, including 
 IE9 will render in SVG by default. But you can override settings, e.g. 
 if you wish to rencer in canvas.

 In the future, VML will disappear and there will be mainly SVG and 
 Canvas. Those two are quite different. SVG is based on a DOM tree and 
 keeps it state, while canvas renders vectors into rasters and then 
 forgets about its state. Canvas is often faster, but not very suitable 
 for interactive vector graphics, this means if you want to edit or 
 restyle features without reloading/redrawing, you are better off with 
 SVG. SVG performance also improves from browser to browser.

 As to performance problems: especially with IE6 to IE8 you will 
 certainly run into performance problems. Other browsers should be much 
 better. However, there is a limit as SVG is a DOM based technology. This 
 limit depends on hardware and software and could be with several 
 thousand features or even below. If you have tens of thousand of 
 features you definitely need a different strategy. One strategy would be 
 to render in raster unless you need special interactivity or editing. 
 You would enable editing only at certain zoom factors, which means that 
 you would have a lot less features in the DOM.

 Hope this helps a bit,
 Andreas

 On Wed, 25 May 2011 17:05:08 -0600, Samuel M. Smith wrote:
> How does Openlayers render features on a vectory layer? How are they
> represented internally. From my limited understanding of Javascript,
> there are no graphics primitives for drawing arbitrary shapes. HTML5
> has a canvas element that allows such graphics primitives but
> OpenLayers
> doesn't require HTML5 so I am curious how its done?
>
> Also if I want to display a lot of geometry on vector layers will I
> run into performance problems with the javascript based rendering?
>
> 
> **********************************************************************
>
> Samuel M. Smith Ph.D.
>
> 242 East 600 North, Lindon Utah 84042-1662 USA
>
> 801-768-2768 voice
>
> 801-768-2769 fax
>
> 
> **********************************************************************
>
> "The greatest source of failure and unhappiness in the world is
>
> giving up what we want most for what we want at the moment"
>
> 
> **********************************************************************

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Users mailing list