SVG makes white lines in the browser - svg

I made a 24x24-pixel logo. It consists of polygons that stand side by side.
I'm showing this in various sizes on my web page in the range of 40 pixels and 24 pixels.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="katman_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<polygon points="6,20 4,16 2,20 "/>
<polygon points="4,16 2,12 0,16 "/>
<polygon points="6,12 4,8 2,12 "/>
<polygon points="8,8 6,4 4,8 "/>
<polygon points="10,12 8,8 6,12 "/>
<polygon points="14,12 12,8 10,12 "/>
<polygon points="18,12 16,8 14,12 "/>
<polygon points="22,12 20,8 18,12 "/>
<polygon points="12,16 10,12 8,16 "/>
<polygon points="20,16 18,12 16,16 "/>
<polygon points="4,16 6,20 8,16 "/>
<polygon points="2,12 4,16 6,12 "/>
<polygon points="0,16 2,20 4,16 "/>
<polygon points="4,8 6,12 8,8 "/>
<polygon points="6,4 8,8 10,4 "/>
<polygon points="8,8 10,12 12,8 "/>
<polygon points="16,8 18,12 20,8 "/>
<polygon points="18,12 20,16 22,12 "/>
<polygon points="10,12 12,16 14,12 "/>
<polygon points="8,16 10,20 12,16 "/>
<polygon points="16,16 18,20 20,16 "/>
<polygon points="20,16 22,20 24,16 "/>
<polygon points="10,20 8,16 6,20 "/>
<polygon points="14,20 12,16 10,20 "/>
<polygon points="18,20 16,16 14,20 "/>
<polygon points="22,20 20,16 18,20 "/>
</svg>
But white lines form between svg elements...
For example:
Original svg file: bz.svg
I can't combine them because in some cases I color each one separately. How can I fix this?

shape-rendering will help in most cases. But it is not guaranteed. You still might find the odd white pixel. Plus it has the disadvantage that you lose the anti-aliasing on the outside edges. Leaving the sloped edges "jaggy".
Another solution, as others have suggested, is to add a thin stroke to your shapes. The width that that stroke needs to be will depend on the slope of the join line, and the 2D rendering engine that the browser uses.
A third solution is to merge adjacent triangles if they are the same colour. You can write a little javascript to do the merging. You probably don't have to worry about the adjacent triangles that have different colours. If the colours are different enough, the slight white line probably won't be noticeable.
A fourth option is similar. Instead of merging triangles, look for edges of triangles that later triangles abut against, and give those sides a "bulge". For example by using an extra point halfway along that side, that sticks out a bit. The idea is that the earlier triangle extends under the later one.
One final solution, I can think of, is to run a filter over the shape to remove the anti-aliasing artifacts.
The ideal filter for this would be a median filter, But unfortunately, SVG/CSS has no median filter. Michael Mullany created a very clever hack that simulates a median filter using a combination of the filter primitives that are available.
<svg version="1.1" id="katman_1" viewBox="0 0 24 24">
<defs>
<filter id="median">
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 1 0 0 0 0 0" result="1" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="1 0 0 0 0 0 0 0 0" result="2" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 1 0 0 0 0 0 0 0" result="3" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 1 0 0 0 0 0 0" result="4" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 0 0 1 0 0 0" result="5" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 0 0 0 0 0 1" result="6" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 0 0 0 0 1 0" result="7" preserveAlpha="true"/>
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 0 0 0 1 0 0" result="8" preserveAlpha="true" />
<feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 0 0 0 1 0 0 0 0" result="9" preserveAlpha="true" />
<feBlend in="1" in2="2" mode="lighten" result="a1"/>
<feBlend in="1" in2="2" mode="darken" result="a2"/>
<feBlend in="a2" in2="3" mode="lighten" result="a3"/>
<feBlend in="a2" in2="3" mode="darken" result="a4"/>
<feBlend in="a4" in2="4" mode="lighten" result="a5"/>
<feBlend in="a4" in2="4" mode="darken" result="a6"/>
<feBlend in="a6" in2="5" mode="lighten" result="a7"/>
<feBlend in="a6" in2="5" mode="darken" result="a8"/>
<feBlend in="a8" in2="6" mode="lighten" result="a9"/>
<feBlend in="a8" in2="6" mode="darken" result="a10"/>
<feBlend in="a10" in2="7" mode="lighten" result="a11"/>
<feBlend in="a10" in2="7" mode="darken" result="a12"/>
<feBlend in="a12" in2="8" mode="lighten" result="a13"/>
<feBlend in="a13" in2="8" mode="darken" result="a14"/>
<feBlend in="1" in2="2" mode="lighten" result="a15"/>
<feBlend in="1" in2="2" mode="darken" result="a16"/>
<feBlend in="a1" in2="a3" mode="lighten" result="b1"/>
<feBlend in="a1" in2="a3" mode="darken" result="b2"/>
<feBlend in="b2" in2="a5" mode="lighten" result="b3"/>
<feBlend in="b2" in2="a5" mode="darken" result="b4"/>
<feBlend in="b4" in2="a7" mode="lighten" result="b5"/>
<feBlend in="b4" in2="a7" mode="darken" result="b6"/>
<feBlend in="b6" in2="a9" mode="lighten" result="b7"/>
<feBlend in="b6" in2="a9" mode="darken" result="b8"/>
<feBlend in="b8" in2="a11" mode="lighten" result="b9"/>
<feBlend in="b8" in2="a11" mode="darken" result="b10"/>
<feBlend in="b10" in2="a13" mode="lighten" result="b11"/>
<feBlend in="b10" in2="a13" mode="darken" result="b12"/>
<feBlend in="b12" in2="a15" mode="lighten" result="b13"/>
<feBlend in="b12" in2="a15" mode="darken" result="b14"/>
<feBlend in="b1" in2="b3" mode="lighten" result="c1"/>
<feBlend in="b1" in2="b3" mode="darken" result="c2"/>
<feBlend in="c2" in2="b5" mode="lighten" result="c3"/>
<feBlend in="c2" in2="b5" mode="darken" result="c4"/>
<feBlend in="c4" in2="b7" mode="lighten" result="c5"/>
<feBlend in="c4" in2="b7" mode="darken" result="c6"/>
<feBlend in="c6" in2="b9" mode="lighten" result="c7"/>
<feBlend in="c6" in2="b9" mode="darken" result="c8"/>
<feBlend in="c8" in2="b11" mode="lighten" result="c9"/>
<feBlend in="c8" in2="b11" mode="darken" result="c10"/>
<feBlend in="c10" in2="b13" mode="lighten" result="c11"/>
<feBlend in="c10" in2="b13" mode="darken" result="c12"/>
<feBlend in="c1" in2="c3" mode="lighten" result="d1"/>
<feBlend in="d1" in2="c3" mode="darken" result="d2"/>
<feBlend in="d2" in2="c5" mode="lighten" result="d3"/>
<feBlend in="d2" in2="c5" mode="darken" result="d4"/>
<feBlend in="d4" in2="c7" mode="lighten" result="d5"/>
<feBlend in="d4" in2="c7" mode="darken" result="d6"/>
<feBlend in="d6" in2="c9" mode="lighten" result="d7"/>
<feBlend in="d6" in2="c9" mode="darken" result="d8"/>
<feBlend in="d8" in2="c11" mode="lighten" result="d9"/>
<feBlend in="d8" in2="c11" mode="darken" result="d10"/>
<feBlend in="d1" in2="d3" mode="darken" result="e1"/>
<feBlend in="e1" in2="d5" mode="darken" result="e2"/>
<feBlend in="e2" in2="d7" mode="darken" result="e3"/>
<feBlend in="e3" in2="d9" mode="darken" result="e4"/>
</filter>
</defs>
<g filter="url(#median)">
<polygon points="6,20 4,16 2,20 "/>
<polygon points="4,16 2,12 0,16 "/>
<polygon points="6,12 4,8 2,12 "/>
<polygon points="8,8 6,4 4,8 "/>
<polygon points="10,12 8,8 6,12 "/>
<polygon points="14,12 12,8 10,12 "/>
<polygon points="18,12 16,8 14,12 "/>
<polygon points="22,12 20,8 18,12 "/>
<polygon points="12,16 10,12 8,16 "/>
<polygon points="20,16 18,12 16,16 "/>
<polygon points="4,16 6,20 8,16 "/>
<polygon points="2,12 4,16 6,12 "/>
<polygon points="0,16 2,20 4,16 "/>
<polygon points="4,8 6,12 8,8 "/>
<polygon points="6,4 8,8 10,4 "/>
<polygon points="8,8 10,12 12,8 "/>
<polygon points="16,8 18,12 20,8 "/>
<polygon points="18,12 20,16 22,12 "/>
<polygon points="10,12 12,16 14,12 "/>
<polygon points="8,16 10,20 12,16 "/>
<polygon points="16,16 18,20 20,16 "/>
<polygon points="20,16 22,20 24,16 "/>
<polygon points="10,20 8,16 6,20 "/>
<polygon points="14,20 12,16 10,20 "/>
<polygon points="18,20 16,16 14,20 "/>
<polygon points="22,20 20,16 18,20 "/>
</g>
</svg>

Shape Rendering is your culprit amigo.
Just add shape-rendering="crispEdges" to the svg declaration (see in the source example below)...
....or as CSS to hit more than one if you like at the element level like;
svg {
shape-rendering: crispEdges;
}
Enjoy, and cool graphic ;)
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="katman_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve"
shape-rendering="crispEdges"> <!-- **** YOUR NEW FRIEND **** -->
<polygon points="6,20 4,16 2,20 "/>
<polygon points="4,16 2,12 0,16 "/>
<polygon points="6,12 4,8 2,12 "/>
<polygon points="8,8 6,4 4,8 "/>
<polygon points="10,12 8,8 6,12 "/>
<polygon points="14,12 12,8 10,12 "/>
<polygon points="18,12 16,8 14,12 "/>
<polygon points="22,12 20,8 18,12 "/>
<polygon points="12,16 10,12 8,16 "/>
<polygon points="20,16 18,12 16,16 "/>
<polygon points="4,16 6,20 8,16 "/>
<polygon points="2,12 4,16 6,12 "/>
<polygon points="0,16 2,20 4,16 "/>
<polygon points="4,8 6,12 8,8 "/>
<polygon points="6,4 8,8 10,4 "/>
<polygon points="8,8 10,12 12,8 "/>
<polygon points="16,8 18,12 20,8 "/>
<polygon points="18,12 20,16 22,12 "/>
<polygon points="10,12 12,16 14,12 "/>
<polygon points="8,16 10,20 12,16 "/>
<polygon points="16,16 18,20 20,16 "/>
<polygon points="20,16 22,20 24,16 "/>
<polygon points="10,20 8,16 6,20 "/>
<polygon points="14,20 12,16 10,20 "/>
<polygon points="18,20 16,16 14,20 "/>
<polygon points="22,20 20,16 18,20 "/>
</svg>

Related

animateMotion a path with marker-start and marker-end svg only

is it possible to animate a path with marker elements? the path id in question is #orbit1. the reason i created the markers is that they will be used multiple times.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1" viewBox="0 0 1500 1000">
<defs>
<marker id="arrowRight" viewBox="0 0 7.1 11.5" refX="5" refY="5.75"
markerUnits="userSpaceOnUse" orient="auto-start-reverse"
markerWidth="7.1" markerHeight="11.5">
<polygon points="1,11.5 0,10.4 5.1,5.7 0,1 1,0 7.1,5.7" fill="#00897b"/>
</marker>
<marker id="circle" viewBox="0 0 6 6" refX="1" refY="3"
markerUnits="userSpaceOnUse" orient="auto"
markerWidth="6" markerHeight="6">
<circle cx="3" cy="3" r="3" fill="#4caf50"/>
</marker>
</defs>
<!-- arrowhead symbol -->
<symbol>
<path id="d_arrow1" fill="red" d="M-10-10L10 0l-20 10 2-10-2-10z" />
</symbol>
<!-- animateMotion defines the motion path animation -->
<animateMotion xlink:href="#a1" begin="0s" dur="3s" rotate="auto" repeatCount="indefinite">
<mpath xlink:href="#orbit1" />
<!-- mpath = sub-element for the <animateMotion> element provides the ability to reference an external <path> element as the definition of a motion path -->
</animateMotion>
<animateMotion xlink:href="#a2" begin="0s" dur="3s" rotate="auto-reverse" keyPoints="1;0" keyTimes="0;1" calcMode="linear" repeatCount="indefinite">
<mpath xlink:href="#orbit2" />
</animateMotion>
<!-- arrow paths -->
<path id="orbit2" d='M 365 400 A 370 200 0 0 1 1100 400' fill="none" stroke-width="3" style="stroke: green; stroke-dasharray: 50 818; stroke-dashoffset: 50"/>
<!-- marker arrows -->
<!-- orbit1 to be animated using mpath -->
<path id="orbit1" d="M308.7 34.9C381.3 37.4 444.3 78 478.7 137.5" stroke="#4caf50" fill="none" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="50 1000" stroke-dashoffset="50"
marker-start="url(#circle)"
marker-end="url(#arrowRight)"/>
<!-- <animate> svg element used to animate an attribute or property of an element over time. it's normally inserted inside the element or referenced by the href attribute of the target element -->
<animate id="anim1" xlink:href="#orbit1" attributeName="stroke-dashoffset" from="50" to="-960" dur="3s" begin="0s" fill="freeze" repeatCount="indefinite" />
<!-- animate using the animateMotion definition above -->
<animate id="anim2" xlink:href="#orbit2" attributeName="stroke-dashoffset" from="-810" to="50" dur="3s" begin="0s" fill="freeze" repeatCount="indefinite" />
<!-- <use id="a1" xlink:href="#d_arrow1" x="0" y="0" width="100" height="50" />-->
<use id="a2" xlink:href="#d_arrow1" x="0" y="0" width="100" height="50" />
</svg>

Replace parts of SVG

I have an SVG file that was originally created in Visio. It's an electrical diagram. I want to replace one element on this diagram with another that I currently have in a separate file. Here is the original file which shows just one symbol:
And here is its code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 SAMPLE.svg Page-1 -->
<svg
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="8.5in"
height="11in"
viewBox="0 0 612 792"
xml:space="preserve"
color-interpolation-filters="sRGB"
class="st6"
version="1.1"
id="svg678"
sodipodi:docname="SAMPLE1.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
id="metadata684"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs682" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1022"
id="namedview680"
showgrid="false"
inkscape:zoom="2"
inkscape:cx="408"
inkscape:cy="795.24519"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g676" />
<v:documentProperties
v:langID="1033"
v:viewMarkup="false">
<v:userDefs>
<v:ud
v:nameU="msvNoAutoConnect"
v:val="VT0(1):26" />
</v:userDefs>
</v:documentProperties>
<style
type="text/css"
id="style348">
<![CDATA[
.st1 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.25}
.st2 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
.st3 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
.st4 {fill:#000000;font-family:Calibri;font-size:0.499992em}
.st5 {fill:#ffffff}
.st6 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
]]>
</style>
<g
v:mID="0"
v:index="1"
v:groupContext="foregroundPage"
id="g676">
<title
id="title350">Page-1</title>
<v:pageProperties
v:drawingScale="1"
v:pageScale="1"
v:drawingUnits="0"
v:shadowOffsetX="9"
v:shadowOffsetY="-9" />
<v:layer
v:name="Connector"
v:index="0" />
<v:layer
v:name="Electrical"
v:index="1" />
<g
id="group7-18"
transform="translate(84.24,-648.054)"
v:mID="7"
v:groupContext="group"
v:layerMember="1">
<v:custProps>
<v:cp
v:nameU="SubType"
v:lbl="Switch type"
v:type="1"
v:format="Mushroom Head;Push-Pull Head;Normal"
v:langID="1033"
v:val="VT4(Normal)" />
</v:custProps>
<v:userDefs>
<v:ud
v:nameU="visDescription"
v:val="VT4(Circuit closing (make). Right-click for mushroom head, push-pull head.)" />
<v:ud
v:nameU="visVersion"
v:val="VT0(14):26" />
</v:userDefs>
<title
id="title385">Pushbutton make</title>
<desc
id="desc387">START</desc>
<g
id="shape8-19"
v:mID="8"
v:groupContext="shape"
v:layerMember="1"
transform="translate(11.97,-17.5061)">
<title
id="title389">Sheet.8</title>
</g>
<g
id="shape9-21"
v:mID="9"
v:groupContext="shape"
v:layerMember="1"
transform="translate(0,1.34663)">
<title
id="title392">Sheet.9</title>
<path
d="M23.94 790.65 A1.49625 1.34662 0 1 1 26.93 790.65 A1.49625 1.34662 0 1 1 23.94 790.65 ZM8.98 790.65 A1.49625 1.34662 0 1 1 11.97 790.65 A1.49625 1.34662 0 1 1 8.98 790.65 Z"
class="st5"
id="path394" />
<path
d="M10.47 786.61 L25.44 786.61"
class="st2"
id="path396" />
<path
d="M17.96 769.11 L17.96 786.61"
class="st2"
id="path398" />
<path
d="M23.94 790.65 A1.49625 1.34662 0 1 1 26.93 790.65 A1.49625 1.34662 0 1 1 23.94 790.65"
class="st2"
id="path400" />
<path
d="M8.98 790.65 A1.49625 1.34662 0 1 1 11.97 790.65 A1.49625 1.34662 0 1 1 8.98 790.65"
class="st2"
id="path402" />
<path
d="M35.91 790.65 L26.93 790.65"
class="st2"
id="path404" />
<path
d="M0 790.65 L8.98 790.65"
class="st2"
id="path406" />
</g>
<g
id="shape7-29"
v:mID="7"
v:groupContext="groupContent"
v:layerMember="1">
<v:textBlock
v:margins="rect(1,1,1,1)"
v:verticalAlign="0" />
<v:textRect
cx="17.955"
cy="796.602"
width="18.7"
height="9.20349" />
<text
x="10.29"
y="798.4"
class="st4"
v:langID="1033"
id="text409"><v:paragraph
v:horizAlign="1" /><v:tabList />START</text>
</g>
</g>
</g>
</svg>
And here is another to replace with:
And here is its code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="PushButtonBreak.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="400"
inkscape:cy="560"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1022"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="group11-31"
transform="matrix(0.35277777,0,0,0.35277777,100.54167,-119.40724)"
v:mID="11"
v:groupContext="group"
v:layerMember="1">
<v:custProps>
<v:cp
v:nameU="SubType"
v:lbl="Switch type"
v:type="1"
v:format="Mushroom Head;Push-Pull Head;Normal"
v:langID="1033"
v:val="VT4(Normal)" />
</v:custProps>
<v:userDefs>
<v:ud
v:nameU="visDescription"
v:val="VT4(Circuit opening (break). Right-click for mushroom head, push-pull head.)" />
<v:ud
v:nameU="visVersion"
v:val="VT0(14):26" />
</v:userDefs>
<title
id="title413">Pushbutton break</title>
<desc
id="desc415">STOP</desc>
<g
id="shape12-32"
v:mID="12"
v:groupContext="shape"
v:layerMember="1"
transform="translate(12,-17.55)">
<title
id="title417">Sheet.12</title>
</g>
<g
id="shape13-34"
v:mID="13"
v:groupContext="shape"
v:layerMember="1"
transform="translate(0,1.35)">
<title
id="title420">Sheet.13</title>
<path
d="m 24,790.65 a 1.5,1.35 0 1 1 3,0 1.5,1.35 0 1 1 -3,0 z m -15,0 a 1.5,1.35 0 1 1 3,0 1.5,1.35 0 1 1 -3,0 z"
class="st5"
id="path422"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
<path
d="M 0,790.65 H 9"
class="st2"
id="path424"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
<path
d="M 36,790.65 H 27"
class="st2"
id="path426"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
<path
d="m 10.5,792 h 15"
class="st2"
id="path428"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
<path
d="M 18,769.05 V 792"
class="st2"
id="path430"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
<path
d="m 24,790.65 a 1.5,1.35 0 1 1 3,0 1.5,1.35 0 1 1 -3,0"
class="st2"
id="path432"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
<path
d="m 9,790.65 a 1.5,1.35 0 1 1 3,0 1.5,1.35 0 1 1 -3,0"
class="st2"
id="path434"
inkscape:connector-curvature="0"
style="stroke:#000000;stroke-width:0.23999999;stroke-linecap:round;stroke-linejoin:round" />
</g>
<g
id="shape11-42"
v:mID="11"
v:groupContext="groupContent"
v:layerMember="1">
<v:textBlock
v:margins="rect(1,1,1,1)"
v:verticalAlign="0" />
<v:textRect
cx="18"
cy="796.602"
width="16.12"
height="9.20349" />
<text
x="11.62"
y="798.40002"
class="st4"
v:langID="1033"
id="text437"
style="font-size:5.99990416px;font-family:Calibri;fill:#000000"><v:paragraph
v:horizAlign="1" />
<v:tabList />
STOP</text>
</g>
</g>
</g>
</svg>
I want to know what the appropriate strategy for swapping elements is. Can that be done in pure javascript/jQuery or I need additional libraries?
Thanks for help.
Matching dimensions is a process that SVG has a lot of facilities for. Unfortunately, your files do not use them properly, so a lot of things can go wrong when you copy and paste: wrong positioning of text, wrong text size, wrong line widths, height/width distortions.
There is really no maintainable way around re-engineering the whole thing. You are in luck I have the time. Here is what I would do. It uses the SVG <symbol> element to define reusable templates. Although I have no idea whether Visio can work with them, I've tried to maintain its markup.
For your end result, add attribute xmlns:xlink="http://www.w3.org/1999/xlink" to your complete diagram file. Then copy the <style>, <symbol> elements as its immediate childs. If there already is a <style> in your file, note that they will interact. Be careful with the names of classes, you might need to rename some of them to avoid conflicts.
Look in the markup for
<title>Pushbutton make</title>
elements, and replace their parent <g> element with the <use> element, and, as a first attempt, exchange the transform attribute with that that was part of the <g>. That in no way guarantees that the symbol will now be in the right place, but now you can move the <use> element around by changing the transform attribute until it fits. (You can also use for example Inkscape as an UI for that.)
To exchange the rendered symbol, all you need now is to change the xlink:href attribute to reference either make or break state. The script gives an example how to do that.
var state = true;
setInterval(function () {
state = !state;
var id = "#Pushbutton." + (state ? 'make' : 'break');
document.querySelector('#button1').setAttribute('xlink:href', id);
}, 2000);
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="st6">
<v:documentProperties v:viewMarkup="false" v:langID="1033">
<v:userDefs>
<v:ud v:val="VT0(1):26" v:nameU="msvNoAutoConnect" />
</v:userDefs>
</v:documentProperties>
<style>
<![CDATA[
.st1 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.25}
.st2 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
.st3 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
.st4 {fill:#000000;font-family:Calibri;font-size:0.5em;text-anchor:middle}
.st5 {fill:#ffffff}
.st6 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
.st7 {fill:#000000;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
]]>
</style>
<symbol id="Pushbutton.make" viewBox="0 0 36 30">
<v:custProps><v:cp v:val="VT4(Normal)" v:langID="1033" v:format="Mushroom Head;Push-Pull Head;Normal" v:type="1" v:lbl="Switch type" v:nameU="SubType" /></v:custProps><v:userDefs>
<v:ud v:val="VT4(Circuit closing (make). Right-click for mushroom head, push-pull head.)" v:nameU="visDescription" />
<v:ud v:val="VT0(14):26" v:nameU="visVersion" /></v:userDefs>
<title>Pushbutton make</title>
<desc>START</desc>
<g>
<title>Sheet.8</title>
</g>
<g>
<title>Sheet.9</title>
<path class="st2" d="M 10.5,17.5 H 25.5" />
<path class="st2" d="M 18,0 V 17.5" />
<path class="st3" d="M 24,21.5 A 1.5,1.5 0 1 1 27,21.5 1.5,1.5 0 1 1 24,21.5 Z" />
<path class="st3" d="M 9,21.5 A 1.5,1.5 0 1 1 12,21.5 1.5,1.5 0 1 1 9,21.5 Z" />
<path class="st2" d="M 36,21.5 H 27" />
<path class="st2" d="M 0,21.5 H 9" />
</g>
<g>
<v:textBlock v:verticalAlign="0" v:margins="rect(1,1,1,1)" />
<v:textRect height="9.2" width="18.7" cy="26.1" cx="18" />
<text class="st4" y="28" x="18">
<v:paragraph v:horizAlign="0" />
<v:tabList />START</text>
</g>
</symbol>
<symbol id="Pushbutton.break" viewBox="0 0 36 30">
<v:custProps><v:cp v:val="VT4(Normal)" v:langID="1033" v:format="Mushroom Head;Push-Pull Head;Normal" v:type="1" v:lbl="Switch type" v:nameU="SubType" /></v:custProps><v:userDefs>
<v:ud v:val="VT4(Circuit closing (make). Right-click for mushroom head, push-pull head.)" v:nameU="visDescription" />
<v:ud v:val="VT0(14):26" v:nameU="visVersion" /></v:userDefs>
<title>Pushbutton break</title>
<desc>STOP</desc>
<g>
<title>Sheet.8</title>
</g>
<g>
<title>Sheet.9</title>
<path class="st2" d="M 10.5,23 H 25.5" />
<path class="st2" d="M 18,0 V 23" />
<path class="st7" d="M 24,21.5 A 1.5,1.5 0 1 1 27,21.5 1.5,1.5 0 1 1 24,21.5 Z" />
<path class="st7" d="M 9,21.5 A 1.5,1.5 0 1 1 12,21.5 1.5,1.5 0 1 1 9,21.5 Z" />
<path class="st2" d="M 36,21.5 H 27" />
<path class="st2" d="M 0,21.5 H 9" />
</g>
<g>
<v:textBlock v:verticalAlign="0" v:margins="rect(1,1,1,1)" />
<v:textRect height="9.2" width="17.2" cy="26.1" cx="18" />
<text class="st4" y="28" x="18">
<v:paragraph v:horizAlign="0" />
<v:tabList />STOP</text>
</g>
</symbol>
<g>
<title>Page-1</title>
<v:pageProperties v:shadowOffsetY="-9" v:shadowOffsetX="9" v:drawingUnits="0" v:pageScale="1" v:drawingScale="1" />
<v:layer v:index="0" v:name="Connector" />
<v:layer v:index="1" v:name="Electrical" />
<use id="button1" xlink:href="#Pushbutton.break" width="36" height="30" transform="translate(50 50) scale (3)" />
</g>
</svg>

Why SVG doesn't appear correctly in Firefox?

My SVG logo appears fine in Chrome and Safari. It is made in Illustrator (not by me, I don't know the version). But in FF it is looking weird. Can't find out the reason. I do not use any filters, just SVG image. I've noticed, if I implement it with 'img' tag it looks fine, but becomes too little. Here's the code:
<span>
<a href="#">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="190px" height="42px" viewBox="93.496 77.153 190 42"
overflow="visible" enable-background="new 93.496 77.153 190 42" xml:space="preserve">
<defs></defs>
<g>
<defs>
<path class="logotype" id="SVGID_2_" d="M125.99,85.758c-0.725-0.005-1.443-0.016-2.154-0.034c0.072-1.776,0.818-3.368,2.002-4.549
c1.244-1.236,2.953-2,4.854-2c1.898,0,3.609,0.764,4.854,2c1.102,1.1,1.829,2.561,1.978,4.193
c-3.235,0.256-6.702,0.396-10.312,0.396C126.806,85.765,126.398,85.762,125.99,85.758 M124.41,79.744
c-1.531,1.522-2.508,3.611-2.596,5.918c-4.139-0.158-8.042-0.497-11.571-0.982l-1.538,7.253c5.02,0.72,10.882,1.135,17.144,1.135
c1.814,0,3.595-0.036,5.331-0.104l4.226,21.692c9.233,0.162,17.411,1.503,22.897,3.531l-6.656-35.073
c-3.283,0.903-7.416,1.617-12.107,2.078c-0.195-2.121-1.139-4.029-2.566-5.447c-1.605-1.602-3.832-2.591-6.281-2.591
S126.014,78.142,124.41,79.744"/>
</defs>
<clipPath id="SVGID_3_">
<use xlink:href="#SVGID_2_" overflow="visible"/>
</clipPath>
<rect x="102.238" y="77.153" clip-path="url(#SVGID_3_)" fill="#C80711" width="59.287" height="52.211"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M137.781,150.214l-13.065-12.074l-13.067,12.074l1.295-17.745l-17.588-2.688
l14.68-10.052l-8.865-15.427l17.012,5.211l6.534-16.55l6.534,16.55l17.013-5.211l-8.866,15.427l14.682,10.052l-17.59,2.688
L137.781,150.214z M124.716,133.246l8.821,8.153l-0.873-11.981l11.873-1.812l-9.912-6.787l5.986-10.414l-11.484,3.517
l-4.411-11.171l-4.411,11.171l-11.485-3.517l5.986,10.414l-9.911,6.787l11.873,1.812l-0.873,11.981L124.716,133.246z"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M146.598,169.522l-21.882-20.223l-21.88,20.223l2.166-29.714l-29.449-4.5
l24.58-16.832L85.289,92.644l28.487,8.724l10.939-27.71l10.939,27.71l28.488-8.724l-14.846,25.832l24.583,16.832l-29.451,4.5
L146.598,169.522z M124.716,144.407l17.634,16.298l-1.746-23.947l23.736-3.627l-19.812-13.566l11.965-20.818l-22.958,7.032
l-8.818-22.334l-8.817,22.334L92.94,98.746l11.964,20.818L85.092,133.13l23.736,3.627l-1.746,23.947L124.716,144.407z"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M94.051,188.764l3.037-41.644l-41.273-6.305l34.45-23.59L69.461,81.023
l39.923,12.227l15.332-38.834l15.333,38.834l39.924-12.225l-20.805,36.201l34.451,23.59l-41.275,6.305l3.037,41.644l-30.665-28.338
L94.051,188.764z M124.716,155.534l26.419,24.413l-2.615-35.878l35.559-5.431l-29.682-20.324l17.926-31.188L137.925,97.66
l-13.209-33.461L111.507,97.66L77.111,87.125l17.924,31.188l-29.681,20.324l35.558,5.431l-2.615,35.878L124.716,155.534z"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M85.701,207.058l3.863-52.984l-52.515-8.022l43.834-30.014L54.411,69.977
l50.796,15.556l19.509-49.412l19.507,49.412l50.798-15.556l-26.472,46.061l43.833,30.014l-52.515,8.022l3.863,52.984
l-39.015-36.056L85.701,207.058z M124.716,166.11l34.771,32.131l-3.443-47.217l46.8-7.15l-39.064-26.748l23.59-41.046
l-45.268,13.863l-17.386-44.037L107.33,89.943L62.062,76.078l23.592,41.048l-39.063,26.748l46.799,7.15l-3.442,47.217
L124.716,166.11z"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M171.932,225.026l-47.216-43.637l-47.217,43.637l4.677-64.124l-63.556-9.708
l53.048-36.323L39.634,59.128l61.474,18.825l23.608-59.8l23.61,59.8l61.472-18.825l-32.035,55.742l53.046,36.323l-63.552,9.708
L171.932,225.026z M124.716,176.497l42.971,39.712l-4.254-58.356l57.838-8.837l-48.277-33.056l29.154-50.731l-55.945,17.135
l-21.487-54.424l-21.487,54.424L47.285,65.228l29.153,50.731l-48.277,33.056L86,157.852l-4.254,58.356L124.716,176.497z"/>
<path class="logotype" clip-path="url(#SVGID_3_)" fill="#E74200" d="M180.219,243.18l-55.503-51.295L69.212,243.18l5.497-75.378L0,156.389
l62.357-42.699L24.701,48.164l72.264,22.133L124.716,0l27.753,70.296l72.263-22.131l-37.658,65.524l62.357,42.699l-74.708,11.413
L180.219,243.18z M124.716,186.994l51.257,47.369l-5.076-69.61l68.994-10.541l-57.587-39.433l34.777-60.514l-66.734,20.438
l-25.63-64.917l-25.63,64.918L32.352,54.265l34.777,60.514L9.541,154.211l68.993,10.541l-5.075,69.61L124.716,186.994z"/>
</g>
<g>
<defs>
<path class="logotype" id="SVGID_1_" d="M98.551,89.699l-4.895,28.619c5.639-1.504,13.049-2.419,21.174-2.419c8.184,0,15.645,0.927,21.295,2.451
l-4.945-25.388c-1.736,0.068-3.517,0.104-5.331,0.104c-11.22,0-21.155-1.329-27.261-3.368H98.551z"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_1_" overflow="visible"/>
</clipPath>
<rect x="87.936" y="84.597" transform="matrix(1 0.0028 -0.0028 1 0.2934 -0.3189)" clip-path="url(#SVGID_4_)" fill="#F8B700" width="53.723" height="41.486"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,93.814c-6.564,0-9.894-1.302-13.111-2.561
c-3.082-1.205-5.994-2.344-11.964-2.344c-5.974,0-8.884,1.139-11.965,2.344c-3.219,1.259-6.547,2.561-13.113,2.561
c-6.567,0-9.894-1.302-13.111-2.561c-3.082-1.205-5.993-2.344-11.964-2.344v-3.151c6.564,0,9.894,1.302,13.111,2.56
c3.082,1.205,5.992,2.345,11.964,2.345s8.884-1.14,11.966-2.345c3.218-1.258,6.544-2.56,13.112-2.56
c6.564,0,9.894,1.302,13.111,2.56c3.082,1.205,5.992,2.345,11.964,2.345V93.814z"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,99.516c-6.564,0-9.894-1.301-13.111-2.56
c-3.082-1.205-5.994-2.344-11.964-2.344c-5.974,0-8.884,1.139-11.965,2.344c-3.219,1.259-6.547,2.56-13.113,2.56
c-6.567,0-9.894-1.301-13.111-2.56c-3.082-1.205-5.993-2.344-11.964-2.344v-3.15c6.564,0,9.894,1.3,13.111,2.559
c3.082,1.203,5.992,2.344,11.964,2.344s8.884-1.141,11.966-2.344c3.218-1.259,6.544-2.559,13.112-2.559
c6.564,0,9.894,1.3,13.111,2.559c3.082,1.203,5.992,2.344,11.964,2.344V99.516z"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,105.219c-6.564,0-9.894-1.302-13.111-2.562
c-3.082-1.204-5.994-2.343-11.964-2.343c-5.974,0-8.884,1.139-11.965,2.343c-3.219,1.26-6.547,2.562-13.113,2.562
c-6.567,0-9.894-1.302-13.111-2.562c-3.082-1.204-5.993-2.343-11.964-2.343v-3.151c6.564,0,9.894,1.301,13.111,2.561
c3.082,1.205,5.992,2.343,11.964,2.343s8.884-1.138,11.966-2.343c3.218-1.26,6.544-2.561,13.112-2.561
c6.564,0,9.894,1.301,13.111,2.561c3.082,1.205,5.992,2.343,11.964,2.343V105.219z"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,110.921c-6.564,0-9.894-1.301-13.111-2.561
c-3.082-1.203-5.994-2.343-11.964-2.343c-5.974,0-8.884,1.14-11.965,2.343c-3.219,1.26-6.547,2.561-13.113,2.561
c-6.567,0-9.894-1.301-13.111-2.561c-3.082-1.203-5.993-2.343-11.964-2.343v-3.151c6.564,0,9.894,1.301,13.111,2.56
c3.082,1.205,5.992,2.343,11.964,2.343s8.884-1.138,11.966-2.343c3.218-1.259,6.544-2.56,13.112-2.56
c6.564,0,9.894,1.301,13.111,2.56c3.082,1.205,5.992,2.343,11.964,2.343V110.921z"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,116.625c-6.564,0-9.894-1.303-13.111-2.56
c-3.082-1.207-5.994-2.347-11.964-2.347c-5.974,0-8.884,1.14-11.965,2.347c-3.219,1.257-6.547,2.56-13.113,2.56
c-6.567,0-9.894-1.303-13.111-2.56c-3.082-1.207-5.993-2.347-11.964-2.347v-3.15c6.564,0,9.894,1.303,13.111,2.561
c3.082,1.205,5.992,2.345,11.964,2.345s8.884-1.14,11.966-2.345c3.218-1.258,6.544-2.561,13.112-2.561
c6.564,0,9.894,1.303,13.111,2.561c3.082,1.205,5.992,2.345,11.964,2.345V116.625z"/>
<path class="logotype yellow" clip-path="url(#SVGID_4_)" fill="#FFD303" d="M147.943,122.328c-6.564,0-9.894-1.302-13.111-2.561
c-3.082-1.204-5.994-2.344-11.964-2.344c-5.974,0-8.884,1.14-11.965,2.344c-3.219,1.259-6.547,2.561-13.113,2.561
c-6.567,0-9.894-1.302-13.111-2.561c-3.082-1.204-5.993-2.344-11.964-2.344v-3.15c6.564,0,9.894,1.3,13.111,2.558
c3.082,1.206,5.992,2.345,11.964,2.345s8.884-1.139,11.966-2.345c3.218-1.258,6.544-2.558,13.112-2.558
c6.564,0,9.894,1.3,13.111,2.558c3.082,1.206,5.992,2.345,11.964,2.345V122.328z"/>
</g>
<path class="logotype" fill="#FFFFFF" d="M104.481,98.085c0.056-1.06,0.961-1.873,2.02-1.818c1.061,0.057,1.874,0.962,1.816,2.021
c-0.056,1.059-0.963,1.874-2.021,1.816C105.237,100.049,104.425,99.143,104.481,98.085"/>
<path class="logotype" fill="#FFFFFF" d="M121.512,98.991c0.057-1.06,0.96-1.874,2.021-1.817c1.058,0.057,1.872,0.963,1.816,2.021
c-0.057,1.06-0.963,1.873-2.02,1.816C122.269,100.955,121.454,100.049,121.512,98.991"/>
<path class="logotype" fill="#FFFFFF" d="M122.422,100.533c-0.112,2.086-1.057,3.921-2.504,5.219c-1.448,1.294-3.385,2.037-5.483,1.927
c-2.101-0.112-3.947-1.059-5.25-2.499c-1.302-1.442-2.047-3.367-1.937-5.454l-1.662-0.088c-0.137,2.541,0.779,4.906,2.363,6.659
c1.583,1.755,3.846,2.909,6.396,3.046c2.551,0.134,4.924-0.774,6.684-2.351c1.762-1.575,2.922-3.829,3.058-6.37L122.422,100.533z"/>
<polygon fill="#E50004" points="164.267,111.836 169.359,111.836 169.359,112.818 167.371,112.818 167.371,117.895 166.293,117.895
166.293,112.818 164.267,112.818 "/>
<path class="logotype red" fill="#E50004" d="M173.748,111.731c1.877,0,3.238,1.32,3.238,3.131c0,1.783-1.387,3.127-3.238,3.127
c-1.855,0-3.233-1.337-3.233-3.127C170.515,113.112,171.929,111.731,173.748,111.731 M173.756,117.049
c1.17,0,2.086-0.938,2.086-2.172c0-1.24-0.871-2.18-2.086-2.18c-1.199,0-2.086,0.939-2.086,2.18
C171.67,116.093,172.583,117.049,173.756,117.049"/>
<path class="logotype red" fill="#E50004" d="M180.176,116.137v1.757h-1.068v-6.058h1.854c1.611,0,2.422,0.888,2.422,2.155
c0,1.266-0.803,2.146-2.629,2.146H180.176z M180.176,112.818v2.369h0.707c1.001,0,1.344-0.533,1.344-1.195
c0-0.664-0.336-1.174-1.344-1.174H180.176z"/>
<polygon fill="#E50004" points="185.557,111.836 189.494,111.836 189.494,112.818 186.623,112.818 186.623,117.895 185.557,117.895
"/>
<path class="logotype red" fill="#E50004" d="M193.855,111.731c1.879,0,3.24,1.32,3.24,3.131c0,1.783-1.387,3.127-3.24,3.127s-3.23-1.337-3.23-3.127
C190.625,113.112,192.037,111.731,193.855,111.731 M193.865,117.049c1.174,0,2.084-0.938,2.084-2.172c0-1.24-0.869-2.18-2.084-2.18
c-1.201,0-2.088,0.939-2.088,2.18C191.777,116.093,192.691,117.049,193.865,117.049"/>
<path class="logotype red" fill="#E50004" d="M199.214,111.836h1.939c1.561,0,2.26,0.646,2.26,1.602c0,0.656-0.381,1.122-1.061,1.363
c0.836,0.241,1.223,0.73,1.223,1.379c0,1.076-1.043,1.714-2.422,1.714h-1.939V111.836z M200.285,112.818v1.647h0.766
c0.869,0.008,1.25-0.44,1.25-0.897c0-0.413-0.309-0.75-1.096-0.75H200.285z M200.285,115.231v1.681h0.92
c0.906,0,1.215-0.396,1.215-0.845c0-0.413-0.344-0.836-1.471-0.836H200.285z"/>
<path class="logotype red" fill="#E50004" d="M207.394,113.592c1.828,0,2.629,0.881,2.629,2.147c0,1.268-0.811,2.153-2.422,2.153h-1.854v-6.057h1.068
v1.756H207.394z M207.521,116.912c1.008,0,1.346-0.508,1.346-1.172c0-0.663-0.344-1.196-1.346-1.196h-0.705v2.368H207.521z"/>
<rect x="211.56" y="111.836" fill="#E50004" width="1.068" height="6.057"/>
<polygon fill="#E50004" points="220.744,117.893 219.675,117.893 219.675,114.137 215.873,117.937 215.589,117.937 215.589,111.836
216.658,111.836 216.658,115.706 220.406,111.801 220.744,111.801 "/>
<polygon fill="#E50004" points="231.878,116.912 231.878,111.836 230.81,111.836 230.81,116.912 228.136,116.912 228.136,111.836
227.068,111.836 227.068,117.893 231.414,117.893 231.414,118.552 232.398,118.552 232.482,116.912 "/>
<polygon fill="#E50004" points="234.394,111.836 238.333,111.836 238.333,112.818 235.462,112.818 235.462,114.516 238.066,114.516
238.066,115.463 235.462,115.463 235.462,116.912 238.333,116.912 238.333,117.895 234.394,117.895 "/>
<polygon fill="#E50004" points="244.634,115.507 241.675,115.507 241.675,117.893 240.607,117.893 240.607,111.836 241.675,111.836
241.675,114.559 244.634,114.559 244.634,111.844 245.703,111.844 245.703,117.893 244.634,117.893 "/>
<polygon fill="#E50004" points="247.449,111.836 252.542,111.836 252.542,112.818 250.554,112.818 250.554,117.895 249.476,117.895
249.476,112.818 247.449,112.818 "/>
<path class="logotype" fill="#E50004" d="M255.361,116.137v1.757h-1.068v-6.058h1.854c1.611,0,2.422,0.888,2.422,2.155
c0,1.266-0.803,2.146-2.629,2.146H255.361z M255.361,112.818v2.369h0.707c1.002,0,1.346-0.533,1.346-1.195
c0-0.664-0.336-1.174-1.346-1.174H255.361z"/>
<polygon fill="#E50004" points="219.472,111.126 217.14,111.426 217.14,110.569 219.472,110.569 "/>
<path class="logotype red" fill="#E50004" d="M179.885,93.099c-0.427-1.114-1.057-2.094-1.874-2.91c-0.815-0.814-1.829-1.459-3.011-1.918
c-1.18-0.455-2.529-0.686-4.015-0.686c-1.338,0-2.603,0.251-3.763,0.746c-1.155,0.498-2.18,1.188-3.046,2.051l-0.208,0.211
c0,0,0.322,1.734,2.021,2.366l0.242-0.243c0.611-0.611,1.334-1.098,2.148-1.446c0.811-0.348,1.694-0.524,2.627-0.524
c0.996,0,1.88,0.131,2.625,0.395c0.736,0.262,1.365,0.63,1.873,1.098c0.511,0.465,0.921,1.033,1.224,1.682
c0.228,0.49,0.355,1.18,0.479,1.758c-0.229-0.252-0.679-0.4-1.052-0.453c-0.559-0.076-1.127-0.116-1.686-0.116h-5.823
c0,0-0.592,1.777,0,3.161h5.823c0.498,0,1.01,0.037,1.514,0.109c0.4,0.061,0.877,0.184,1.129,0.49
c-0.176,0.579-0.389,0.968-0.734,1.456c-0.4,0.562-0.879,1.055-1.432,1.459c-0.552,0.403-1.174,0.724-1.85,0.947
c-0.674,0.224-1.385,0.339-2.112,0.339c-1.062,0-2.046-0.23-2.93-0.685c-0.886-0.451-1.646-1.075-2.257-1.856l-0.26-0.329
c-1.424,0.595-1.938,2.635-1.938,2.635l0.174,0.194c0.895,0.99,1.979,1.779,3.213,2.344c1.236,0.568,2.59,0.856,4.02,0.856
c1.336,0,2.598-0.248,3.75-0.737c1.148-0.487,2.162-1.164,3.014-2.017s1.529-1.87,2.018-3.026c0.488-1.16,0.736-2.418,0.736-3.736
C180.525,95.421,180.31,94.208,179.885,93.099"/>
<path class="logotype red" fill="#E50004" d="M200.203,93.099c0.428-1.114,1.059-2.094,1.873-2.91c0.816-0.814,1.83-1.459,3.014-1.918
c1.178-0.455,2.529-0.686,4.014-0.686c1.338,0,2.605,0.251,3.764,0.746c1.154,0.498,2.178,1.188,3.045,2.051l0.207,0.211
c0,0-0.32,1.734-2.02,2.366l-0.242-0.243c-0.611-0.611-1.338-1.098-2.148-1.446c-0.811-0.348-1.697-0.524-2.625-0.524
c-1,0-1.881,0.131-2.627,0.395c-0.734,0.262-1.365,0.63-1.873,1.098c-0.512,0.465-0.922,1.033-1.223,1.682
c-0.23,0.49-0.355,1.18-0.482,1.758c0.23-0.252,0.682-0.4,1.055-0.453c0.559-0.076,1.125-0.116,1.684-0.116h5.824
c0,0,0.592,1.777,0,3.161h-5.824c-0.498,0-1.008,0.037-1.514,0.109c-0.402,0.061-0.875,0.184-1.129,0.49
c0.176,0.579,0.391,0.968,0.734,1.456c0.4,0.562,0.881,1.055,1.432,1.459c0.553,0.403,1.174,0.724,1.852,0.947
c0.674,0.224,1.385,0.339,2.111,0.339c1.062,0,2.047-0.23,2.93-0.685c0.889-0.451,1.646-1.075,2.256-1.856l0.26-0.329
c1.424,0.595,1.939,2.635,1.939,2.635l-0.174,0.194c-0.896,0.99-1.977,1.779-3.211,2.344c-1.24,0.568-2.592,0.856-4.02,0.856
c-1.338,0-2.602-0.248-3.752-0.737c-1.148-0.487-2.162-1.164-3.016-2.017c-0.85-0.853-1.527-1.87-2.016-3.026
c-0.488-1.16-0.736-2.418-0.736-3.736C199.564,95.421,199.781,94.208,200.203,93.099"/>
<path class="logotype red" fill="#E50004" d="M235.472,91.248h6.102v14.592c0,0,1.51,0.681,3.068,0V91.248h6.031c0.674-1.414,0-3.158,0-3.158h-15.201
C235.472,88.089,234.785,89.76,235.472,91.248"/>
<path class="logotype red" fill="#E50004" d="M267.292,95.464c0.252-0.641,0.381-1.37,0.381-2.171c0-0.802-0.129-1.53-0.381-2.17
c-0.252-0.644-0.617-1.2-1.086-1.651c-0.467-0.447-1.039-0.797-1.701-1.032c-0.652-0.231-1.377-0.351-2.16-0.351h-9.121v17.75
c0,0,1.492,0.717,3.139,0v-6.707c0.436-0.21,0.887-0.355,1.344-0.433c0.529-0.089,1.066-0.132,1.602-0.132h3.033
c0.789,0,1.516-0.123,2.168-0.365c0.662-0.244,1.234-0.605,1.703-1.071C266.675,96.666,267.041,96.105,267.292,95.464
M262.33,91.248c0.748,0,1.312,0.154,1.678,0.456c0.35,0.286,0.527,0.821,0.527,1.59c0,1.442-0.701,2.114-2.203,2.114h-3.027
c-0.572,0-1.146,0.037-1.707,0.115c-0.416,0.062-0.828,0.182-1.229,0.365l-0.006-4.641H262.33z"/>
<path class="logotype red" fill="#E50004" d="M274.802,88.105h-1.17l-8.762,17.734c0,0,1.758,0.664,3.404,0l0.529-0.979
c0.047-0.096,1.137-1.521,3.656-1.521h6.246l1.123,2.501c1.346,0.591,3.506,0,3.506,0L274.802,88.105z M277.265,100.177h-3.289
c-1.996,0-2.592,0.282-3.018,0.536l3.105-6.72L277.265,100.177z"/>
<path class="logotype red" fill="#E50004" d="M186.615,88.089l-0.271,2.808c-0.088,0.845-0.197,1.722-0.318,2.601c-0.121,0.858-0.283,1.71-0.477,2.533
c-0.195,0.822-0.445,1.628-0.744,2.396c-0.297,0.768-0.847,1.761-1.291,2.467c-0.31,0.487-0.598,0.873-0.855,1.145
c-0.256,0.268-0.492,0.469-0.713,0.596c-0.211,0.126-0.406,0.206-0.579,0.238c-0.202,0.033-0.39,0.052-0.565,0.052h-0.008
c0,0-0.85,1.702,0,3.16h0.008c0.237,0,0.521-0.016,0.844-0.048c0.337-0.033,0.692-0.107,1.06-0.221
c0.374-0.109,0.758-0.285,1.138-0.511c0.387-0.23,0.752-0.547,1.079-0.941c0.703-0.842,1.308-1.802,1.8-2.856
c0.486-1.046,1.075-2.401,1.404-3.547c0.329-1.145,0.6-2.33,0.8-3.525c0.182-1.082,0.327-2.15,0.434-3.187h4.325v14.591
c0,0,1.777,0.57,3.137,0v-17.75H186.615z"/>
<path class="logotype red" fill="#E50004" d="M228.027,96.486h0.01l-0.008-0.005l0.008-0.008h-0.01l-0.006-0.009l5.844-8.374c0,0-2.352-0.743-3.783,0
l-4.348,6.416h-2.32c-0.965,0-1.328,0.256-1.541,0.474v-6.936c0,0-1.572-0.759-3.137,0v17.762c1.564,0.758,3.137,0,3.137,0V98.16
c0.193-0.23,0.469-0.553,1.545-0.553h1.85l4.814,8.153c1.432,0.741,3.783,0,3.783,0l-5.844-9.263L228.027,96.486z"/>
</svg>
</a>
</span>
Finally I implemented it through <img> tag like this:
<img src="app/svg-icons/logo.svg" alt="logo" height="87px" width="200px" />
But it would be interesting, why it doesn't work with inline implementation.
Do you have other embedded SVGs on the page? If so then read on.
Perhaps the most common cause for problems like this is that you are including multiple SVG images on the page which have clashing id attributes. This can easily happen if you have made the SVGs in an editor like Illustrator, which reuses the same ids for every image it creates.
If you look at the SVG contents, you'll see that the ids in there are "SVGID_1_", "SVGID_2_", "SVGID_3_", etc.
id attributes in an HTML must be unique. How duplicate ids are handled can vary from browser to browser, which is why you are getting different results in FF and Chrome.
The fix is to (manually) edit each id value to make them unique. Don't forget to edit any references to them as well (eg.: the entries like xlink:href="#SVGID_1_").

How to make multiple <g> objects clickable within one SVG

So I have read at least 10 other similar questions but none of the solutions seem to work for me.
What I am trying to do:
I have a bunch of SVG code that makes a tiny city. I want to make each building link to a different webpage.
Sorry for the messy code.
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="800px"
height="800px" viewBox="0 0 800 800" enable-background="new 0 0 800 800" xml:space="preserve">
<defs>
<filter id="f1" x="0" y="0">
<feGaussianBlur in="SourceGraphic" stdDeviation="4" />
</filter>
</defs>
<g>
<path fill="#ABABAA" d="M502.987,318.81l-9.145,1.983c-0.385-0.433-0.822-0.721-1.267-0.792c0.379-0.752,0.498-1.841,0.247-2.995
c-0.289-1.332-0.986-2.379-1.771-2.831c-0.005-0.458-0.047-0.935-0.153-1.424c-0.516-2.377-2.087-4.052-3.514-3.743
c-0.012,0.004-0.023,0.013-0.033,0.014c-0.855-3.094-2.835-5.229-4.617-4.843c-1.389,0.3-2.256,2.055-2.333,4.318
c-0.495-0.408-1.028-0.6-1.539-0.488c-0.959,0.206-1.557,1.412-1.619,2.966c-0.567-0.415-1.169-0.608-1.745-0.484
c-1.413,0.306-2.2,2.346-1.98,4.802c-0.369-0.147-0.744-0.207-1.109-0.129c-1.637,0.355-2.442,3.036-1.802,5.993
c0.048,0.218,0.113,0.415,0.174,0.622c-0.722,0.723-1.013,2.283-0.644,3.984c0.346,1.595,1.17,2.843,2.057,3.291
c-0.162,0.92-0.143,1.982,0.094,3.082c0.632,2.905,2.554,4.952,4.296,4.574c0.2-0.044,0.39-0.126,0.569-0.227
c0.494,0.929,1.2,1.548,1.91,1.619c0.63,1.739,1.775,2.963,2.939,3.135c0.673,2.367,2.28,3.978,3.762,3.658
c0.855-0.185,1.476-0.987,1.786-2.09c0.596,1.074,1.474,1.716,2.297,1.538c0.874-0.191,1.43-1.244,1.473-2.577
c0.534,0.355,1.105,0.517,1.656,0.396c1.521-0.329,2.322-2.571,1.88-5.082c0.008-0.002,0.014,0,0.021-0.002
c1.848-0.399,2.804-3.22,2.135-6.302c-0.428-1.974-1.417-3.563-2.56-4.353c0.064-0.083,0.107-0.197,0.163-0.294l8.416-1.825
h-0.042V318.81z"/>
<path fill="#634E42" d="M502.987,284.44v34.37v5.496h0.042h10.386v-38.75c-1.239,1.169-2.891,1.902-4.729,1.902
C506.311,287.458,504.236,286.258,502.987,284.44z"/>
<path fill="#81AE84" d="M549.442,261.866c0-4.596-2.966-8.53-7.217-10.327c0.973-1.284,1.555-2.834,1.555-4.522
c0-3.17-2.034-5.884-4.951-7.144c1.017-1.506,1.634-3.273,1.634-5.179c0-4.67-3.54-8.561-8.279-9.543
c0.43-1.065,0.696-2.206,0.696-3.41c0-5.411-4.744-9.795-10.608-9.795c-0.431,0-0.835,0.069-1.25,0.118
c-1.071-2.77-3.909-4.759-7.281-4.759c-3.164,0-5.864,1.747-7.079,4.245c-1.674-1.145-3.693-1.816-5.874-1.816
c-5.762,0-10.428,4.665-10.428,10.427c0,0.666,0.079,1.318,0.198,1.949c-1.965,0.929-3.426,2.735-3.855,4.927
c-3.549,0.8-6.339,3.58-7.143,7.13c-4.759,0.508-8.472,4.482-8.472,9.373c0,2.83,1.264,5.338,3.224,7.075
c-2.275,1.14-3.855,3.471-3.855,6.195c0,2.894,1.768,5.366,4.275,6.414c-0.893,1.445-1.433,3.134-1.433,4.961
c0,5.025,3.916,9.088,8.853,9.413c0,0.025-0.006,0.045-0.006,0.065c0,6.11,4.947,11.058,11.06,11.058
c3.914,0,7.33-2.039,9.296-5.105c0.145,0.286,0.308,0.561,0.487,0.822c1.249,1.818,3.324,3.018,5.698,3.018
c1.839,0,3.49-0.733,4.729-1.902c0.976-0.92,1.701-2.104,2.019-3.454c1.268,1.709,3.283,2.829,5.572,2.829
c2.643,0,4.908-1.487,6.088-3.654c0.869,0.297,1.788,0.494,2.76,0.494c4.715,0,8.531-3.815,8.531-8.531
c0-0.039-0.011-0.078-0.011-0.117C544.585,272.539,549.442,267.755,549.442,261.866z"/>
</g>
<g class="contact">
<polygon fill="#E19190" points="323.274,315.865 323.274,383.485 378.57,410.467 378.57,342.846 "/>
<polygon fill="#576D88" points="344.127,339.484 344.127,348.713 351.673,352.396 351.673,343.166 "/>
<polygon fill="#E7A7A6" points="378.57,342.849 378.57,410.469 471.507,365.832 471.507,298.877 "/>
<polygon fill="#E1E1E5" points="479.992,307.993 478.396,308.748 478.396,323.463 479.992,322.697 "/>
<polygon fill="#E1E1E5" points="419.792,342.757 419.792,376.337 465.945,354.17 465.945,320.92 "/>
<polygon fill="#798AA0" points="421.202,343.941 421.202,374.003 464.421,353.149 464.421,323.384 "/>
<polygon fill="#E1E1E5" points="413.26,346.012 395.126,354.591 395.126,402.516 413.26,393.807 "/>
<polygon fill="#798AA0" points="412.034,348.044 396.352,355.465 396.352,389.695 412.034,382.163 "/>
<polygon fill="#D9D9DF" points="323.276,315.866 378.576,342.849 471.511,298.875 417.217,273.874 "/>
<polygon fill="#576D88" points="382.776,303.51 402.701,313.232 436.186,297.388 416.624,288.379 "/>
<polygon fill="#E1E1E5" points="468.005,302.13 466.36,302.876 478.394,308.754 479.994,307.996 "/>
<polygon fill="#576D88" points="417.456,281.649 459.75,301.07 464.018,299.051 417.101,277.5 331.67,315.642 336.277,317.89
"/>
<polygon fill="#D9D9DF" points="466.365,302.877 466.365,317.592 478.397,323.463 478.397,308.749 "/>
<polygon fill="#ABABAA" points="466.36,302.879 466.36,317.591 464.27,317.084 464.27,302.477 "/>
<polygon fill="#ABABAA" points="378.571,410.471 323.272,383.482 310.109,383.482 361.236,410.5 "/>
</g>
<g class="work">
<polygon fill="#D5C8B2" points="330.181,352.667 330.181,436.629 141.844,528.766 141.844,422.516 177.281,422.531
177.281,404.978 212.69,404.978 212.69,387.539 247.293,387.539 247.293,370.104 283.238,370.641 283.238,353.741 "/>
<polygon fill="#CABA9F" points="141.833,422.523 53.313,378.932 53.313,479.658 141.833,528.758 "/>
<polygon fill="#575756" points="212.713,405.078 124.804,361.571 88.759,361.471 177.29,405.071 "/>
<polygon fill="#797978" points="212.698,387.636 212.692,405.065 124.772,361.573 124.809,343.564 "/>
<polygon fill="#575756" points="177.276,422.531 88.834,379.024 53.322,378.924 141.853,422.524 "/>
<polygon fill="#797978" points="177.297,405.063 177.255,422.519 88.813,379.026 88.781,361.469 "/>
<polygon fill="#575756" points="247.3,387.629 159.236,343.289 124.816,343.57 212.692,387.629 "/>
<polygon fill="#797978" points="247.294,370.189 247.294,387.623 159.257,343.301 159.242,326.122 "/>
<polygon fill="#575756" points="283.242,370.735 195.253,327.204 159.238,326.125 247.3,370.208 "/>
<polygon fill="#575756" points="330.183,352.753 237.099,309.099 195.257,310.04 283.22,353.831 "/>
<polygon fill="#797978" points="283.242,353.831 283.236,370.735 195.246,327.207 195.253,310.038 "/>
<polygon fill="#D5C8B2" points="255.452,334.799 272.72,334.448 267.819,265.029 255.452,265.029 "/>
<polygon fill="#CABA9F" points="243.668,329.11 255.46,334.755 255.46,265.031 248.043,263.045 "/>
<polygon fill="#575756" points="267.825,265.031 255.46,265.036 248.049,263.045 259.594,263.045 "/>
<g>
<polygon fill="#575756" points="224.034,488.68 170.469,514.657 170.469,455.978 224.134,430.006 "/>
<polygon fill="#797978" points="224.034,488.68 170.469,514.657 170.469,510.574 224.034,484.595 "/>
<polygon fill="#797978" points="224.034,480.861 170.469,506.842 170.469,502.757 224.034,476.779 "/>
<polygon fill="#797978" points="224.034,473.044 170.469,499.023 170.469,494.941 224.034,468.961 "/>
<polygon fill="#797978" points="224.034,465.228 170.469,491.206 170.469,487.124 224.034,461.145 "/>
<polygon fill="#797978" points="224.034,457.41 170.469,483.391 170.469,479.306 224.034,453.327 "/>
<polygon fill="#797978" points="224.034,449.594 170.469,475.573 170.469,471.49 224.034,445.51 "/>
<polygon fill="#797978" points="224.034,441.776 170.469,467.756 170.469,463.674 224.034,437.694 "/>
<polygon fill="#797978" points="224.034,433.961 170.469,459.939 170.469,455.856 224.034,429.876 "/>
</g>
<g>
<polygon fill="#575756" points="313.025,445.026 263.011,469.282 263.011,414.492 313.119,390.241 "/>
<polygon fill="#797978" points="313.025,445.026 263.011,469.282 263.011,465.47 313.025,441.212 "/>
<polygon fill="#797978" points="313.025,437.727 263.011,461.984 263.011,458.171 313.025,433.915 "/>
<polygon fill="#797978" points="313.025,430.427 263.011,454.685 263.011,450.873 313.025,426.614 "/>
<polygon fill="#797978" points="313.025,423.13 263.011,447.386 263.011,443.574 313.025,419.316 "/>
<polygon fill="#797978" points="313.025,415.829 263.011,440.088 263.011,436.273 313.025,412.017 "/>
<polygon fill="#797978" points="313.025,408.531 263.011,432.789 263.011,428.977 313.025,404.718 "/>
<polygon fill="#797978" points="313.025,401.231 263.011,425.489 263.011,421.678 313.025,397.42 "/>
<polygon fill="#797978" points="313.025,393.935 263.011,418.19 263.011,414.379 313.025,390.12 "/>
</g>
<polygon fill="#ABABAA" points="141.797,528.752 53.281,479.652 29,479.652 110.32,528.832 "/>
</g>
<g class="about">
<polygon fill="#798AA0" points="750.926,326.083 750.926,404.376 691.513,432.475 691.513,353.721 "/>
<polygon fill="#E1E1E5" points="735.656,354.756 713.323,365.145 713.323,422.307 735.656,411.745 "/>
<polygon fill="#576D88" points="691.513,353.72 691.513,432.474 597.56,387.8 597.56,311.595 "/>
<polygon fill="#D9D9DF" points="617.513,347.591 617.513,360.963 601.56,353.378 601.56,340.439 "/>
<polygon fill="#D9D9DF" points="639.513,357.258 639.513,370.629 623.56,363.044 623.56,350.105 "/>
<polygon fill="#D9D9DF" points="661.513,366.924 661.513,380.296 645.56,372.711 645.56,359.772 "/>
<polygon fill="#D9D9DF" points="683.513,376.591 683.513,389.962 667.56,382.377 667.56,369.439 "/>
<polygon fill="#E7A7A6" points="750.925,326.084 718.686,287.855 695.659,296.606 691.515,353.715 "/>
<polygon fill="#E19190" points="695.663,296.61 691.51,353.721 597.56,311.589 597.56,249.174 "/>
<polygon fill="#EDBDBC" points="718.688,287.856 597.563,233.053 597.563,249.173 695.657,296.61 "/>
<polygon fill="#798AA0" points="597.56,173.183 597.56,387.8 564.861,402.538 564.861,186.54 "/>
<polygon fill="#576D88" points="564.861,186.54 564.86,402.538 519.46,382.403 519.46,164.561 "/>
<polygon fill="#D9D9DF" points="536.195,202.642 536.195,241.032 528.126,237.453 528.126,198.735 "/>
<polygon fill="#D9D9DF" points="551.861,208.309 551.861,246.699 543.792,243.12 543.792,204.402 "/>
<polygon fill="#D9D9DF" points="536.195,256.309 536.195,294.699 528.126,291.12 528.126,252.402 "/>
<polygon fill="#D9D9DF" points="551.861,261.976 551.861,300.366 543.792,296.787 543.792,258.069 "/>
<polygon fill="#D9D9DF" points="536.195,309.976 536.195,348.366 528.126,344.787 528.126,306.069 "/>
<polygon fill="#D9D9DF" points="551.861,315.643 551.861,354.033 543.792,350.454 543.792,311.736 "/>
<polygon fill="#E7A7A6" points="597.559,173.184 564.859,186.541 555.649,102.719 "/>
<polygon fill="#E19190" points="519.46,164.562 564.859,186.54 555.65,102.722 "/>
<polygon fill="#ABABAA" points="519.407,382.439 498.485,382.45 540.376,402.548 564.876,402.548 "/>
<polygon fill="#ABABAA" points="691.513,432.474 669.834,432.474 586.157,392.939 597.563,387.798 "/>
</g>
<g>
<path fill="#ABABAA" d="M689.987,525.81l-9.145,1.983c-0.385-0.433-0.822-0.721-1.267-0.792c0.379-0.752,0.498-1.841,0.247-2.995
c-0.289-1.332-0.986-2.379-1.771-2.831c-0.005-0.458-0.047-0.935-0.153-1.424c-0.516-2.377-2.087-4.052-3.514-3.743
c-0.012,0.004-0.023,0.013-0.033,0.014c-0.855-3.094-2.835-5.228-4.617-4.843c-1.389,0.3-2.256,2.055-2.333,4.318
c-0.495-0.408-1.028-0.6-1.539-0.488c-0.959,0.206-1.557,1.412-1.619,2.966c-0.567-0.415-1.169-0.608-1.745-0.484
c-1.413,0.306-2.2,2.346-1.98,4.802c-0.369-0.148-0.744-0.207-1.109-0.129c-1.637,0.354-2.442,3.036-1.802,5.993
c0.048,0.218,0.113,0.415,0.174,0.622c-0.722,0.723-1.013,2.283-0.644,3.984c0.346,1.595,1.17,2.843,2.057,3.291
c-0.162,0.92-0.143,1.982,0.094,3.082c0.632,2.905,2.554,4.952,4.296,4.574c0.2-0.044,0.39-0.126,0.569-0.227
c0.494,0.929,1.2,1.548,1.91,1.619c0.63,1.739,1.775,2.963,2.939,3.135c0.673,2.367,2.28,3.979,3.762,3.658
c0.855-0.185,1.477-0.987,1.786-2.09c0.596,1.074,1.474,1.716,2.297,1.538c0.874-0.192,1.43-1.244,1.473-2.577
c0.534,0.355,1.104,0.517,1.656,0.396c1.521-0.329,2.322-2.571,1.88-5.082c0.008-0.002,0.014,0,0.021-0.002
c1.848-0.399,2.804-3.22,2.135-6.302c-0.428-1.974-1.417-3.563-2.56-4.352c0.064-0.083,0.107-0.197,0.163-0.294l8.416-1.825
h-0.042V525.81z"/>
<path fill="#634E42" d="M689.987,491.44v34.37v5.496h0.042h10.386v-38.75c-1.239,1.169-2.891,1.902-4.729,1.902
C693.311,494.458,691.236,493.258,689.987,491.44z"/>
<path fill="#81AE84" d="M736.442,468.866c0-4.596-2.966-8.53-7.217-10.327c0.973-1.284,1.555-2.834,1.555-4.522
c0-3.17-2.034-5.884-4.951-7.144c1.017-1.506,1.634-3.273,1.634-5.179c0-4.67-3.54-8.561-8.279-9.543
c0.43-1.065,0.696-2.206,0.696-3.41c0-5.411-4.744-9.795-10.608-9.795c-0.431,0-0.835,0.069-1.25,0.118
c-1.071-2.77-3.909-4.759-7.281-4.759c-3.164,0-5.864,1.747-7.079,4.245c-1.674-1.145-3.693-1.816-5.874-1.816
c-5.762,0-10.428,4.665-10.428,10.427c0,0.666,0.079,1.318,0.198,1.949c-1.965,0.929-3.426,2.735-3.855,4.927
c-3.549,0.8-6.339,3.58-7.143,7.13c-4.759,0.508-8.472,4.482-8.472,9.373c0,2.83,1.264,5.338,3.224,7.075
c-2.275,1.14-3.855,3.471-3.855,6.195c0,2.894,1.768,5.366,4.275,6.414c-0.893,1.445-1.433,3.134-1.433,4.961
c0,5.025,3.916,9.088,8.852,9.413c0,0.025-0.006,0.045-0.006,0.065c0,6.11,4.947,11.058,11.06,11.058
c3.914,0,7.33-2.039,9.296-5.105c0.144,0.286,0.308,0.561,0.487,0.822c1.249,1.818,3.324,3.018,5.698,3.018
c1.839,0,3.49-0.733,4.729-1.902c0.976-0.92,1.701-2.104,2.019-3.454c1.268,1.709,3.283,2.829,5.572,2.829
c2.643,0,4.908-1.487,6.088-3.654c0.869,0.297,1.788,0.494,2.76,0.494c4.715,0,8.531-3.815,8.531-8.531
c0-0.039-0.011-0.078-0.011-0.117C731.585,479.539,736.442,474.755,736.442,468.866z"/>
</g>
<g>
<path fill="#ABABAA" d="M110.487,562.31l-9.145,1.983c-0.385-0.433-0.822-0.721-1.267-0.792c0.379-0.752,0.498-1.841,0.247-2.995
c-0.289-1.332-0.986-2.379-1.771-2.831c-0.005-0.458-0.047-0.935-0.153-1.424c-0.516-2.377-2.087-4.052-3.514-3.743
c-0.012,0.004-0.023,0.013-0.033,0.014c-0.855-3.094-2.835-5.228-4.617-4.843c-1.389,0.3-2.256,2.055-2.333,4.318
c-0.495-0.408-1.028-0.6-1.539-0.488c-0.959,0.206-1.557,1.412-1.619,2.966c-0.567-0.415-1.169-0.608-1.745-0.484
c-1.413,0.306-2.2,2.346-1.98,4.802c-0.369-0.148-0.744-0.207-1.109-0.129c-1.637,0.354-2.442,3.036-1.802,5.993
c0.048,0.218,0.113,0.415,0.174,0.622c-0.722,0.723-1.013,2.283-0.644,3.984c0.346,1.595,1.17,2.843,2.057,3.291
c-0.162,0.92-0.144,1.982,0.094,3.082c0.632,2.905,2.554,4.952,4.296,4.574c0.2-0.044,0.39-0.126,0.569-0.227
c0.494,0.929,1.2,1.548,1.91,1.619c0.63,1.739,1.775,2.963,2.938,3.135c0.673,2.367,2.28,3.979,3.762,3.658
c0.855-0.185,1.476-0.987,1.786-2.09c0.596,1.074,1.474,1.716,2.297,1.538c0.874-0.192,1.43-1.244,1.473-2.577
c0.534,0.355,1.104,0.517,1.656,0.396c1.52-0.329,2.322-2.571,1.88-5.082c0.008-0.002,0.014,0,0.021-0.002
c1.848-0.399,2.804-3.22,2.135-6.302c-0.428-1.974-1.417-3.563-2.561-4.352c0.064-0.083,0.107-0.197,0.163-0.294l8.416-1.825
h-0.042V562.31z"/>
<path fill="#634E42" d="M110.487,527.94v34.37v5.496h0.042h10.386v-38.75c-1.239,1.169-2.891,1.902-4.73,1.902
C113.812,530.958,111.736,529.758,110.487,527.94z"/>
<path fill="#81AE84" d="M156.942,505.366c0-4.596-2.966-8.53-7.217-10.327c0.973-1.284,1.555-2.834,1.555-4.522
c0-3.17-2.034-5.884-4.951-7.144c1.017-1.506,1.634-3.273,1.634-5.179c0-4.67-3.54-8.561-8.279-9.543
c0.43-1.065,0.696-2.206,0.696-3.41c0-5.411-4.744-9.795-10.608-9.795c-0.431,0-0.835,0.069-1.25,0.118
c-1.071-2.77-3.909-4.759-7.281-4.759c-3.164,0-5.864,1.747-7.079,4.245c-1.674-1.145-3.693-1.816-5.874-1.816
c-5.762,0-10.428,4.665-10.428,10.427c0,0.666,0.079,1.318,0.198,1.949c-1.965,0.929-3.426,2.735-3.855,4.927
c-3.549,0.8-6.339,3.58-7.144,7.13c-4.759,0.508-8.472,4.482-8.472,9.373c0,2.83,1.264,5.338,3.224,7.075
c-2.275,1.14-3.855,3.471-3.855,6.195c0,2.894,1.768,5.366,4.275,6.414c-0.893,1.445-1.433,3.134-1.433,4.961
c0,5.025,3.916,9.088,8.853,9.413c0,0.025-0.006,0.045-0.006,0.066c0,6.11,4.947,11.058,11.06,11.058
c3.914,0,7.33-2.039,9.296-5.104c0.145,0.286,0.308,0.56,0.487,0.822c1.249,1.818,3.324,3.018,5.698,3.018
c1.839,0,3.49-0.733,4.73-1.902c0.976-0.92,1.701-2.104,2.019-3.454c1.269,1.709,3.283,2.829,5.572,2.829
c2.643,0,4.908-1.487,6.088-3.654c0.869,0.297,1.788,0.494,2.76,0.494c4.715,0,8.531-3.815,8.531-8.531
c0-0.039-0.011-0.078-0.011-0.117C152.085,516.039,156.942,511.255,156.942,505.366z"/>
</g>
<g>
<g>
<polygon fill="none" points="386.887,481.157 386.964,497.627 386.889,481.157 386.888,481.157 "/>
<polygon fill="none" points="394.864,495.059 405.099,489.348 405.095,489.347 "/>
<polygon fill="none" points="363.381,512.62 363.384,512.618 363.381,512.617 "/>
<polygon fill="none" points="367.97,472.557 353.97,466.211 367.957,472.56 "/>
<polygon fill="none" points="388.688,498.503 388.674,495.596 388.688,498.503 "/>
<polygon fill="#E19190" points="390.309,481.019 390.309,481.022 421.182,464.771 "/>
<polygon fill="#E19190" points="405.095,489.347 405.099,489.348 438.26,470.849 423.418,465.566 423.418,479.119 "/>
<polygon fill="#E19190" points="386.888,481.156 386.888,481.157 386.889,481.157 386.889,481.133 367.97,472.557
367.957,472.56 "/>
<polygon fill="#E19190" points="388.61,481.914 388.611,481.912 388.61,481.912 "/>
<polygon fill="#E19190" points="363.46,529.102 363.46,529.1 363.457,529.101 "/>
<path fill="#E19190" d="M363.381,512.62v-0.003l-38.598-21.238h0l-0.002-0.002v14.49l38.675,23.233l-0.078-16.48H363.381z
M327.921,504.18c-1.084,0-1.962-1.955-1.962-4.366c0-2.412,0.878-4.367,1.962-4.367c1.083,0,1.961,1.955,1.961,4.367
C329.882,502.225,329.004,504.18,327.921,504.18z M358.297,521.521c-1.293,0-2.341-2.182-2.341-4.874
c0-2.691,1.048-4.872,2.341-4.872c1.293,0,2.342,2.181,2.342,4.872C360.639,519.339,359.591,521.521,358.297,521.521z"/>
<polygon fill="#D9D9DF" points="386.964,497.627 386.887,481.157 386.888,481.157 386.888,481.156 367.957,472.56
353.97,466.211 352.626,465.602 352.626,480.09 353.706,480.641 "/>
<path fill="#E7A7A6" d="M438.261,470.849L438.261,470.849l-33.162,18.499l-10.235,5.711l-4.447,2.48l-0.108-16.518v-0.003
l-1.698,0.894l-0.001,0.002l-0.004,0.001l0.068,13.681l0.014,2.907h0l-0.004,0.001l0.002,0.002l-25.301,14.112h-0.001
l-0.003,0.002h-0.001l0.078,16.48l0.003-0.001l17.785-10.724c-0.321-1.899-0.272-4.04,0.236-6.164
c1.276-5.332,4.923-8.522,8.145-7.122c1.927,0.835,3.258,3.125,3.75,5.97l22.615-13.636c-0.388-1.981-0.362-4.249,0.177-6.501
c1.276-5.333,4.923-8.522,8.145-7.124c2.004,0.869,3.37,3.309,3.811,6.311l10.137-6.113V470.849z"/>
<ellipse fill="#D9D9DF" cx="358.297" cy="516.647" rx="2.341" ry="4.873"/>
<ellipse fill="#D9D9DF" cx="327.921" cy="499.813" rx="1.962" ry="4.367"/>
<polygon fill="#E1E1E5" points="421.182,464.771 390.309,481.022 390.417,497.539 394.864,495.059 405.095,489.347
423.418,479.119 423.418,465.566 423.418,463.592 423.239,463.689 "/>
<polygon fill="#EDBDBC" points="363.381,512.617 363.384,512.618 363.385,512.618 388.686,498.506 388.684,498.504
388.688,498.503 388.674,495.596 388.606,481.915 388.61,481.914 388.61,481.912 388.611,481.912 390.309,481.019
421.182,464.771 423.239,463.689 423.418,463.592 388.304,451.214 352.624,465.601 352.626,465.602 353.97,466.211
367.97,472.557 386.889,481.133 386.889,481.157 386.964,497.627 353.706,480.641 352.626,480.09 324.784,491.379
324.784,491.379 "/>
<path fill="#797978" d="M389.626,505.09c-3.222-1.399-6.869,1.79-8.145,7.122c-0.508,2.124-0.557,4.265-0.236,6.164
c0.484,2.867,1.82,5.182,3.759,6.024c3.222,1.396,6.869-1.792,8.145-7.125c0.513-2.144,0.559-4.304,0.227-6.216
C392.885,508.215,391.554,505.925,389.626,505.09z"/>
<path fill="#797978" d="M424.313,483.799c-3.222-1.397-6.868,1.791-8.145,7.124c-0.539,2.252-0.565,4.52-0.177,6.501
c0.53,2.711,1.837,4.879,3.7,5.685c3.222,1.4,6.868-1.788,8.145-7.122c0.483-2.017,0.557-4.053,0.288-5.877
C427.683,487.107,426.316,484.668,424.313,483.799z"/>
</g>
<polygon fill="#ABABAA" points="324.782,505.867 302.25,505.867 341.765,529.118 363.493,529.118 "/>
</g>
<g>
<g>
<polygon fill="none" points="391.999,597.893 392.077,614.362 392.001,597.893 392,597.893 "/>
<polygon fill="none" points="399.976,611.794 410.211,606.084 410.207,606.082 "/>
<polygon fill="none" points="368.494,629.356 368.496,629.354 368.494,629.354 "/>
<polygon fill="none" points="373.082,589.292 359.082,582.946 373.069,589.296 "/>
<polygon fill="none" points="393.801,615.238 393.787,612.332 393.8,615.238 "/>
<polygon fill="#E19190" points="395.421,597.755 395.421,597.757 426.294,581.506 "/>
<polygon fill="#576D88" points="410.207,606.082 410.211,606.084 443.372,587.584 428.53,582.303 428.53,595.854 "/>
<polygon fill="#E19190" points="392,597.892 392,597.893 392.001,597.893 392.001,597.868 373.082,589.292 373.069,589.296
"/>
<polygon fill="#E19190" points="393.722,598.649 393.724,598.648 393.722,598.648 "/>
<polygon fill="#E19190" points="368.572,645.838 368.572,645.835 368.57,645.836 "/>
<path fill="#576D88" d="M368.494,629.356v-0.002l-38.598-21.239h0.001l-0.002-0.001v14.489l38.675,23.233l-0.077-16.48H368.494z
M333.034,620.915c-1.085,0-1.962-1.954-1.962-4.366c0-2.412,0.878-4.367,1.962-4.367c1.082,0,1.96,1.955,1.96,4.367
C334.994,618.961,334.116,620.915,333.034,620.915z M363.41,638.256c-1.293,0-2.342-2.182-2.342-4.874
c0-2.69,1.048-4.871,2.342-4.871c1.293,0,2.341,2.181,2.341,4.871C365.751,636.074,364.703,638.256,363.41,638.256z"/>
<polygon fill="#D9D9DF" points="392.077,614.362 391.999,597.893 392,597.893 392,597.892 373.069,589.296 359.082,582.946
357.738,582.337 357.738,596.826 358.818,597.376 "/>
<path fill="#798AA0" d="M443.374,587.584h-0.002l-33.161,18.5l-10.235,5.71l-4.447,2.482l-0.108-16.519v-0.002l-1.697,0.893
l-0.001,0.001l-0.003,0.001l0.067,13.682l0.014,2.906h0l-0.004,0.002l0.002,0.001l-25.301,14.113h-0.001l-0.002,0.001h-0.001
l0.077,16.48l0.003-0.001l17.785-10.723c-0.321-1.9-0.272-4.041,0.237-6.165c1.276-5.332,4.922-8.522,8.145-7.122
c1.927,0.835,3.258,3.126,3.75,5.97l22.614-13.636c-0.387-1.98-0.361-4.249,0.177-6.501c1.276-5.333,4.923-8.521,8.145-7.124
c2.003,0.87,3.369,3.309,3.811,6.311l10.138-6.113V587.584z"/>
<ellipse fill="#D9D9DF" cx="363.41" cy="633.383" rx="2.342" ry="4.873"/>
<ellipse fill="#D9D9DF" cx="333.034" cy="616.548" rx="1.962" ry="4.367"/>
<polygon fill="#E1E1E5" points="426.294,581.506 395.421,597.757 395.529,614.275 399.976,611.794 410.207,606.082
428.53,595.854 428.53,582.303 428.53,580.328 428.352,580.424 "/>
<polygon fill="#9AA7B8" points="368.494,629.354 368.496,629.354 368.498,629.354 393.799,615.241 393.796,615.24 393.8,615.238
393.787,612.332 393.719,598.65 393.722,598.649 393.722,598.648 393.724,598.648 395.421,597.755 426.294,581.506
428.352,580.424 428.53,580.328 393.417,567.949 357.736,582.336 357.738,582.337 359.082,582.946 373.082,589.292
392.001,597.868 392.001,597.893 392.077,614.362 358.818,597.376 357.738,596.826 329.897,608.114 329.896,608.114 "/>
<path fill="#797978" d="M394.739,621.825c-3.222-1.399-6.869,1.79-8.145,7.122c-0.509,2.124-0.558,4.265-0.237,6.165
c0.484,2.867,1.82,5.181,3.76,6.023c3.222,1.397,6.869-1.791,8.145-7.125c0.513-2.143,0.559-4.304,0.228-6.216
C397.997,624.951,396.666,622.66,394.739,621.825z"/>
<path fill="#797978" d="M429.426,600.534c-3.223-1.396-6.869,1.791-8.145,7.124c-0.538,2.252-0.564,4.521-0.177,6.501
c0.53,2.711,1.838,4.879,3.7,5.686c3.222,1.4,6.868-1.789,8.145-7.122c0.483-2.018,0.557-4.053,0.288-5.878
C432.795,603.843,431.429,601.404,429.426,600.534z"/>
</g>
<polygon fill="#ABABAA" points="329.895,622.602 307.362,622.602 346.877,645.854 368.605,645.854 "/>
</g>
<g>
<polygon fill="#ABABAA" points="515.037,493.158 494.906,493.158 565.782,538.273 589.906,538.273 "/>
<g>
<polygon fill="none" points="566.432,490.317 566.354,506.787 566.43,490.317 566.432,490.317 "/>
<polygon fill="none" points="558.455,504.219 548.221,498.508 548.223,498.507 "/>
<polygon fill="none" points="589.936,521.78 589.935,521.779 589.936,521.777 "/>
<polygon fill="none" points="585.349,481.717 599.35,475.371 585.361,481.721 "/>
<polygon fill="none" points="564.63,507.663 564.644,504.756 564.632,507.663 "/>
<polygon fill="#E19190" points="563.01,490.179 563.01,490.182 532.137,473.931 "/>
<polygon fill="#D4A139" points="548.223,498.507 548.221,498.508 515.06,480.009 529.9,474.727 529.9,488.279 "/>
<polygon fill="#E19190" points="566.432,490.316 566.432,490.317 566.43,490.317 566.43,490.293 585.349,481.717
585.361,481.721 "/>
<polygon fill="#E19190" points="564.709,491.074 564.708,491.072 564.709,491.072 "/>
<polygon fill="#E19190" points="589.859,538.262 589.859,538.26 589.861,538.261 "/>
<path fill="#DDB461" d="M589.94,521.78l-0.078,16.48l38.675-23.233v-14.49l-0.001,0.002l0,0l-38.599,21.238v0.003H589.94z
M623.438,508.974c0-2.412,0.877-4.367,1.96-4.367c1.084,0,1.962,1.955,1.962,4.367s-0.878,4.366-1.962,4.366
C624.315,513.34,623.438,511.386,623.438,508.974z M592.68,525.807c0-2.691,1.049-4.871,2.342-4.871s2.342,2.18,2.342,4.871
c0,2.692-1.049,4.874-2.342,4.874S592.68,528.499,592.68,525.807z"/>
<polygon fill="#D9D9DF" points="566.354,506.787 566.432,490.317 566.432,490.317 566.432,490.316 585.361,481.721
599.35,475.371 600.693,474.762 600.693,489.25 599.612,489.801 "/>
<path fill="#D4A139" d="M515.057,480.009h0.003l33.161,18.499l10.234,5.711l4.446,2.48l0.108-16.518v-0.003l1.698,0.894
l0.001,0.002l0.002,0.001l-0.067,13.681l-0.014,2.907h0.002l0.002,0.001l-0.002,0.002l25.303,14.113l0,0l0.002,0.001h0.003
l-0.078,16.48l-0.002-0.001l-17.786-10.724c0.321-1.899,0.271-4.04-0.236-6.164c-1.276-5.332-4.923-8.521-8.145-7.122
c-1.927,0.835-3.259,3.125-3.75,5.97l-22.616-13.636c0.389-1.982,0.362-4.249-0.176-6.501c-1.276-5.333-4.923-8.521-8.145-7.124
c-2.004,0.87-3.369,3.309-3.812,6.31l-10.138-6.113V480.009z"/>
<ellipse fill="#D9D9DF" cx="595.021" cy="525.808" rx="2.342" ry="4.873"/>
<ellipse fill="#D9D9DF" cx="625.397" cy="508.973" rx="1.962" ry="4.367"/>
<polygon fill="#E1E1E5" points="532.137,473.931 563.01,490.182 562.901,506.699 558.455,504.219 548.223,498.507 529.9,488.279
529.9,474.727 529.9,472.752 530.08,472.849 "/>
<polygon fill="#E5C788" points="589.936,521.777 589.935,521.779 589.935,521.779 564.632,507.666 564.634,507.664
564.632,507.663 564.644,504.756 564.711,491.075 564.709,491.074 564.709,491.072 564.708,491.072 563.01,490.179
532.137,473.931 530.08,472.849 529.9,472.752 565.015,460.374 600.694,474.761 600.693,474.762 599.35,475.371 585.349,481.717
566.43,490.293 566.43,490.317 566.354,506.787 599.612,489.801 600.693,489.25 628.535,500.539 628.535,500.539 "/>
<path fill="#797978" d="M563.692,514.25c3.222-1.399,6.868,1.79,8.145,7.122c0.508,2.124,0.558,4.265,0.236,6.164
c-0.484,2.867-1.82,5.182-3.76,6.024c-3.222,1.396-6.867-1.791-8.145-7.125c-0.513-2.144-0.558-4.304-0.227-6.216
C560.434,517.375,561.766,515.085,563.692,514.25z"/>
<path fill="#797978" d="M529.006,492.959c3.222-1.397,6.868,1.791,8.145,7.124c0.538,2.252,0.564,4.52,0.176,6.501
c-0.529,2.711-1.837,4.879-3.699,5.685c-3.222,1.4-6.867-1.789-8.145-7.122c-0.482-2.018-0.557-4.054-0.288-5.878
C525.637,496.268,527.002,493.829,529.006,492.959z"/>
</g>
</g>
</svg>
</body>
</html>
Found a really simple solution!
On the 's I want to open links, I just added
onclick="window.open('www.google.com')"

SVG Animation rotate

I've got a very annoying Problem using rotations in my SVG Animation. The problem is: I have an object, which I want to move along a specific path. So far it works well. But if I try to rotate this object at the end of the path it doesn't work. Sometimes my Object disappears because it's outside the viewbox and I have to try many values for the x and y values of the rotate statement until it works. And then it only works if I set the duration to 0.001s so it rotates instant, because actually my object switches to a much higher point in the viewbox and begins to rotate and only the final position is right but you see it rotating down or up around any point so it doesn't really work. I have no idea how to get the x and y values which I need to rotate the object around its own axis. Here is the code example, I hope you know how to solve this problem:
<defs>
<g id="Karte" visibility="hidden">
<!--Karte-->
<rect x="0" y="0" width="980" height="550" style="stroke: none; fill: rgb(189,248,137)" />
<!--Straßen-->
<path id="Straße1" d="M 510 0 L 510 120 0 120 0 150 980 150 980 120 540 120 540 0" style="stroke: none; fill: lightgrey" />
<rect id="Straße2" x="0" y ="320" width="980" height="20" style="stroke:none; fill: lightgrey" />
<rect id="Straße3" x="0" y="500" width="980" height="30" style="stroke:none; fill: lightgrey" />
<rect id="Straße4" x="25" y="340" width="30" height="160" style="stroke:none; fill: lightgrey" />
<rect id="Straße5" x="930" y="340" width="30" height="160" style="stroke:none; fill: lightgrey" />
<path id="campus" d="M 515 150 L 515 170 510 170 510 300 525 300 525 320 650 320 650 300 665 300 665 170 545 170 545 150" style="stroke:none; fill: lightgrey" />
<polyline id="rampe1" points="570,300 570,307 635,317 635,320" style="stroke-width: 1; fill:none" />
<polyline id="rampe2" points="580,300 580,303 645,313 645,320" style="stroke-width: 1; fill:none" />
<g id="Treppe1">
<line x1="515" y1="153" x2="545" y2="153" stroke-width="0.5" />
<line x1="515" y1="157" x2="545" y2="157" stroke-width="0.5" />
<line x1="515" y1="161" x2="545" y2="161" stroke-width="0.5" />
<line x1="515" y1="165" x2="545" y2="165" stroke-width="0.5" />
</g>
<g id="Treppe2">
<line x1="525" y1="303" x2="565" y2="303" stroke-width="0.5" />
<line x1="525" y1="307" x2="565" y2="307" stroke-width="0.5" />
<line x1="525" y1="311" x2="565" y2="311" stroke-width="0.5" />
<line x1="525" y1="315" x2="565" y2="315" stroke-width="0.5" />
</g>
<set attributeName="visibility" to="visible" begin="0s" />
</g>
</defs>
<!--Figuren-->
<defs>
<g id="John" visibility="hidden">
<circle cx="520" cy="100" r="5" />
<line x1="520" y1="104" x2="520" y2="115" stroke-width="2" />
<line x1="520" y1="104" x2="520" y2="117" stroke-width="1" />
<polyline points="520,100 523.5,108 520,112" style="fill:none" />
<polyline points="520,100 514,104 520,108" style="fill:none" />
<set attributeName="visibility" to="visible" begin="0s" />
</g>
</defs>
<!--Animation-->
<use xlink:href="#Karte" />
<use x="420" y="360" transform="rotate(90 910 490)" xlink:href="#John" >
<animateMotion path="M 0 0 L -900 -10" begin="0s" dur="6s" fill="freeze" />
<animateTransform attributeName="transform" type="rotate" from="90 940 490" to="180 940 490" begin="6s" dur="0.001" fill="freeze"/>
<animateMotion path="M-900 -10 L -900 -190" begin="6.01s" dur="3.98s" fill="freeze" />
<animateTransform attributeName="transform" type="rotate" from="180 970 490" to="270 970 490" begin="10s" dur="0.001" fill="freeze"/>
<animateMotion path="M -900 -190 L -450 -190" begin="10.01" dur="4.98" fill="freeze" />
<animateTransform attributeName="transform" type="rotate" from="270 940 490" to="180 940 490" begin="15s" dur="0.001" fill="freeze"/>
<animateMotion path="M -450 -190 L -390 -190" begin="15" dur="1" fill="freeze" />
</use>
</svg>

Resources