[OpenLayers-Users] OL internal (vector) feature organisation

Andreas Hocevar andreas.hocevar at gmail.com
Tue Aug 12 09:14:07 EDT 2008


Hi,

On Tue, Aug 12, 2008 at 2:34 PM, Lars Lingner <ml at lingner.eu> wrote:

> If I understand the comments on above ticket right, than would be a
> proper solution to reorganize the object in one svg tag, like:
>
> <svg>
>    <path class="layer1" id="path1"/>
>    <path class="layer2" id="path2"/>
>    <path class="layer2" id="path3"/>
> </svg>
>
> If anybody could confirm/rebut this that would be great.

Unfortunately, this only works as long as all vector layers are on top
of all other layers. If you e.g. have a WMS layer between layer1 and
layer2, the above will not work. I can think of two ways to work
around that:

1) brute-force: For image-based layers (like WMS) it would be possible
to render the images inside svg/vml (like for externalGraphic
symbols), but the performance (especially while dragging) might be
poor.

2) smart: group vector layers like in the above markup snippet, but
maintain other layers in between. This means that interaction with
vector layers would only work for all the vector layers above the
highest non-vector layer.

Personally, I think that 2) is the way to go. Although it will be hard
to find a clean way to implement it, because the layer management
(raiseLayer,...) will get much more complicated than it is now.

> I'm sure that such an modification needs a lot of work to be done. But I
> really want to do it and if its getting less complicated the better.

Note that there is a new ticket which proposes your solution:
http://trac.openlayers.org/ticket/1666

> If anybody has any ideas to this topic please post it. I simply don't
> know where to start.

Maybe the above suggestions are at least a bit helpful. If you really
want to work on that, you can be sure that you will get help on the
dev list (dev at openlayers.org), because many developers are interested
in this.

Regards,
Andreas.



More information about the Users mailing list