Jvector地图插件问题

Jvector Map Plugin issues

本文关键字:问题 插件 地图 Jvector      更新时间:2023-09-26

希望有人能帮我。我发现了这个很好的jQuery插件,可以在我们的内联网中显示矢量图,但我无法创建HTML代码来使其工作。

http://jvectormap.owl-hollow.net/

我将感谢你的帮助或指导。

谢谢,Tony

可能您忘记设置要放置地图的容器的大小。这应该有效:

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
    <link rel="stylesheet" href="jquery.vector-map.css" type="text/css" media="screen" />
    <script src="jquery-1.6.min.js"></script>
    <script src="jquery.vector-map.js"></script>
    <script src="world-en.js"></script>
    <script>
        $(function(){
            $('#map').vectorMap();
        });
    </script>
</head>
<body>
    <div id="map" style="width: 600px; height: 400px;"></div>
</body>
</html>

我将在下一个版本中添加宽度和高度参数

您必须设置地图。哪个名字在map.js上面。也许你忘了

$('#map').vectorMap({map: 'europe_en'});