Re: SVG tag which specifies the data of the layer for an element.
- Hi Naveen,
> I am not able to find the tag in svg which could specifyIn SVG, visual elements are stacked according to the order they are declared . As far as I know, there is not a specific "layer" concept, although this is usually modeled using through group elements : a nice example from carto.net  shows how can this be achieved (toggle the checkboxes to show/hide the "layers").
> about the layer data of the element present.
Hope this helps,
- Thanks, Samy and Helder - I will check out the script
--- In firstname.lastname@example.org, Helder Magalhães <helder.magalhaes@...> wrote:
> > There is an ecma-script function of Holger Will, with modifications
> > of Jeff Schiller that does the job.
> Yes, I believe there is a slightly updated version in a drag sample  by Jeff Schiller. (View source and search for "getScreenCTM" if you are curious).
> Hope this helps,
> Helder Magalhães
>  http://www.codedread.com/dragtest2.svg
- Naveen wrote:
>Ex: If there are 2 elements present in the svg file where one element is present in 1st layer and the other is present in the 2nd layer. Which tag represents the layer data for the elements?I gather that you are looking for something like a z-index in HTML. In SVG, this is just the rendering order (within the parent node) . So I suppose if you don't know where something is, you could retrieve its parent, and then loop through the children of the parent keeping track of the index until you find the node in question -- that would be the rough equivalent of its stacking order.
The question often arises when you wish to change the stacking order (front to back) of objects. This is typically done by removing an object in the middle of the stack and appending it either to the front or bottom of the stack to move it up or down. I think Andreas Neumann has some nice examples at http://www.carto.net/papers/svg/manipulating_svg_with_dom_ecmascript/ , and I found another one by googling http://wiki.svg.org/Rendering_Order (unfortunately it isn't loading right now, but I suppose that is just a temporary thing).
Hope this helps
[Non-text portions of this message have been removed]