Мне нужно настроить карту, чтобы использовать ее в jvector-карте. Поэтому я использую inline SVG
, чтобы сделать карту. Карта показывает отлично, но я не могу управлять ею с помощью jvectormap. Я просто новичок в jvectormap, поэтому, возможно, мой код является небольшой ошибкой. Если у вас есть какие-либо идеи, любой ответ будет принят.Inline SVG to jvectormap
Заранее спасибо.
Вот мой код все равно:
<div id="pantsun" >
<svg title="well" width="500" height="300" style="border: 1px solid #000;background-color: lightgreen;" >
<rect x="200" y="0" width="30" height="300" style="fill:white;" />
<rect x="0" y="50" width="500" height="30" style="fill:white;" />
<rect x="0" y="150" width="500" height="30" style="fill:white;" />
<rect x="10" y="18" width="30" height="30" style="fill:darkgrey;" />
<rect x="45" y="18" width="30" height="30" style="fill:darkgrey;" />
Sorry, your browser does not support inline SVG.
</svg>
</div>
<script>
$(function(){
$('#pantsun').vectorMap({
map: 'well',
backgroundColor: 'transparent',
markers: [{
coords: [0, 50],
name: 'well 1',
style: {fill: 'white'}
},{
coords: [0, 150],
name: 'well 2',
style: {fill: 'white'}
}}};
</script>
То, что я пытаюсь сделать в этом link.