I have a SVG that has a black and white image.
And using patches with background images, I want to superimpose color images on top of a black and white image so that when you hover the cursor, these parts of the image turn into color.
The full SVG code can be found here.
I assign background images
<style type="text/css"> #BosniaShape { fill: url(#ColorPattern); /* похоже, не работает */ } </style> and
<defs> <pattern id="BosniaPattern" x="0" y="0" width="4800" height="2720"> <image xlink:href="bosnia.jpg" width="281" height="319" /> </pattern> </defs> base image
<image xlink:href="map_bw_2560.jpg" width="4800" height="2720" id="bw" /> and patch
<path id="BosniaShape" class="st0" d="M1227.5,448.5c-8.99-0.4-9-3-9-6s-5-5-6-10s-1.47-10.68-7.98-11.14s-11.44,1.4-12.56,3.91 … C1234.43,442.38,1233.27,448.76,1227.5,448.5z"/> However, it seems that the images are not in the right place.
bosnia.jpg (and other images) are loaded. These are smaller clippings of the main image, but in color.
Images Here
What am I doing wrong?