1

我想将当前时间添加到JQVMAP. 像这样:Eqypt-05:30 AM

默认情况下,当我们将鼠标悬停在一个国家上时,它只在世界地图上显示国家名称。我还想添加当前时间。请帮我。

4

1 回答 1

1

Pleasing to consult the documentation regarding:

onRegionOver: function(event, code, region)
    {
      // log out the region and or code to see the ID
      if (window.console) console.log( region );
    },

http://jqvmap.com/

youll need to do a time conversion hash/object based on element ID or similar

var foo = { "jqvmap1_thisID";"+5","jqvmap1_anotherID":"-2" };

then do the conversion

(not writing all the pseudo code)

OR you could have script that sets the labels onload, and then updates (settimeout 5000), though this is not ideal at all.

good luck! Bo

于 2012-12-07T21:50:17.443 回答