T
tino.cindric
SVG structure
<g id="someID" gmwmsvg:typ="l" gmwmsvgri="1000">
<g id="gwmg4" class="D5F2B3w3j6" gmwmsvg:hi="D5F2B3w3j6 R2v1p1o6r3">
<use xlink:href="#D5F2B3w3j6" x="9916" y="2711"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10380');"></use>
<use xlink:href="#D5F2B3w3j6" x="6995" y="2834"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10390');"></use>
<use xlink:href="#D5F2B3w3j6" x="4644" y="3775"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10379');"></use>
<use xlink:href="#D5F2B3w3j6" x="8604" y="6546"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10375');"></use>
</g>
</g>
Code: (variable X,Y,sAction appropriately set)
ele=doc.getElementById("someID");
nodes=ele.getElementsByTagName("g");
ch=doc.createElement("use");
ch.setAttribute("xlink:href",nodes.item(0).getAttribute("class"));
ch.setAttribute("x",X);
ch.setAttribute("y",Y);
ch.setAttribute("gmwmsvg:act",sAction);
nodes.item(0).appendChild(ch);
nothing happens - any ideas?
<g id="someID" gmwmsvg:typ="l" gmwmsvgri="1000">
<g id="gwmg4" class="D5F2B3w3j6" gmwmsvg:hi="D5F2B3w3j6 R2v1p1o6r3">
<use xlink:href="#D5F2B3w3j6" x="9916" y="2711"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10380');"></use>
<use xlink:href="#D5F2B3w3j6" x="6995" y="2834"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10390');"></use>
<use xlink:href="#D5F2B3w3j6" x="4644" y="3775"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10379');"></use>
<use xlink:href="#D5F2B3w3j6" x="8604" y="6546"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10375');"></use>
</g>
</g>
Code: (variable X,Y,sAction appropriately set)
ele=doc.getElementById("someID");
nodes=ele.getElementsByTagName("g");
ch=doc.createElement("use");
ch.setAttribute("xlink:href",nodes.item(0).getAttribute("class"));
ch.setAttribute("x",X);
ch.setAttribute("y",Y);
ch.setAttribute("gmwmsvg:act",sAction);
nodes.item(0).appendChild(ch);
nothing happens - any ideas?