jvectormap OnClick focus on Europe

2019-07-03 23:27发布

I cannot seem to find any support forums for his plugin...

I have a button which I want to focus on Europe when clicked.

I can focus on regions for example, at the moment I have

          $('#map1').vectorMap('set', 'focus', 'GB');

How do I change this to focus on europe?

标签: jvectormap
1条回答
看我几分像从前
2楼-- · 2019-07-04 00:02

If you use standard map with miller projection it would be:

$('#map1').vectorMap('set', 'focus', 4.3, 0.5, 0.3);

where 4.3 is a scale, 0.5 horizontal coordinate and 0.3 is a vertical coordinate. You can adjust this values to get the desired result.

查看更多
登录 后发表回答