2014-12-29 61 views

回答

0

如果您使用this示例,則可以看到group是一個DOM元素。因此,我們可以應用一個簡單的JavaScript代碼:

group.style.cursor = "pointer" 

你的函數會是這個樣子:

function addInfoBubble() { 
    var group = new H.map.Group(); 

    map.addObject(group); 
    group.style.cursor = "pointer"; 
    // add 'tap' event listener, that opens info bubble, to the group 
    group.addEventListener('tap', function (evt) { 
    // event target is the marker itself, group is a parent event target 
    // for all objects that it contains 
    var bubble = new H.ui.InfoBubble(evt.target.getPosition(), { 
     // read custom data 
     content: evt.target.getData() 
    }); 
    // show info bubble 
    ui.addBubble(bubble); 
    }, false);