bertil.chapuis at heig-vd.ch
Mon Nov 13 11:35:40 EST 2006
thanks for the svn updates. It's very exciting to see the code
modifications. We also think that's important to unify and refactor the
base of code.
Now the first priority is to quickly find a common solution for the
Canvas, SVG and VML Renderers (Paul, thanks a lot for your initiative
with the Renderer Class).
need a very reactive solution for editing functionalities and we drew
our design with this goal. So to answer some questions here are
more explanations about our architecture.
The rendered vectors are directly drawn in vector coordinates. You can
see that if you browse the DOM attributes.
The Renderer.setExtent() function, is used to change the view box of the
SVG/VML document. So the vector layer is completely drawn when the page
is loaded. When pan or zoom actions appends we just reset the visible
part of the document. It's probably not possible to do the same with
canvas. But we can try to simulate it.
Each instance of Renderer class have is own root property. Root is a
reference to a DOM node. So if you want to draw in a second layer, you
must create a new instance of a renderer.
Each Renderer have the ability to trig specific edition events. These
contain a reference to the pointed geometry. The goal was to
make an abstraction layer and allow renderer wich don't manage DOM
events to send the same events as the others. In Canvas, the only
possibility is probably to loop on features and find the geometry
(Note that in SVG/VML renderer we directly put a geometry reference in
the DOM node. So we don't have to loop on the features.)
Paul, it will be a great thing to copy the last version of your canvas
Renderer in the vector/lib/OpenLayers/Renderer folder.
We want discuss this architecture and pay attention to the others
arguments. So it will be nice to have more explanations for the global
Renderer Class and suggestions to merge the two architectures of canvas
and vector XML syntax. Due to time zone difference, it's probably
difficult for all of us to be at the same time on IRC, it's probably
better if we use the mailing-list to answer.
More information about the Dev