jvectormap OnClick focus on Europe

人走茶凉 提交于 2019-12-23 18:04:12

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/12732245/jvectormap-onclick-focus-on-europe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!