开发者

Jvector Map Plugin issues

Hope someone can help me out. I found this nice jQuery plugin to display vector maps in our intranet but I'开发者_StackOverflow中文版m not able to create the HTML code to make it work.

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

I would appreciate your assistance or guidance.

Thank you, Tony


Probably you forgot to set size of container inside of which you want to place the map. This should work:

<!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>

I will add width and height parameters in the next version


You must set your map. which name is on top of map.js. Probably you forgot

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜