I am placing an svg worldmap on a website (I have left only one path (country/region) in the code):
.mapcontainer {height: 120%; width: 100%;}
<div class="mapcontainer">
<svg version="1.2" baseProfile="tiny" id="svg2" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 950 620">
<path fill="black" id="kalimantan" d="M781.68,324.4l-2.31,8.68l-12.53,4.23l-3.75-4.4l-1.82,0.5l3.4,13.12l5.09,0.57l6.79,2.57v2.57l3.11-0.57l4.53-6.27v-5.13l2.55-5.13l2.83,0.57l-3.4-7.13l-0.52-4.59L781.68,324.4L781.68,324.4z" />
</svg>
</div>
From what I have researched the syntax above for the viewBox attribute should make an SVG scale to fill screen or container, but it hits 100% height of screen and leaves space on both sides in width. But I want this particular map to scale to 100% width of screen and overflow on height.
I have tried:
- Setting width inside the svg element
- Ignoring height with ! in the svg file and in css
- Several uses of preserveaspectratio along with the viewbox, including none which was the only time the width got to 100%, though this warped height.
Your help is much appreciated!