2012-12-16 54 views

回答

0

這些應該爲你工作:

function tapHold(map, length) 
{ 
    this.length_ = length; 
    var me = this; 
    me.map_ = map; 
    google.maps.event.addListener(map, 'mousedown', function(e) { me.onMouseDown_(e) }); 
    }; 

tapHold.prototype.onMouseDown_ = function() { this.down_ = +new Date; }; 
new tapHold(map, 300); 
google.maps.event.addListener(map, 
           'longpress', 
           function(event) 
           { 
            <YOUR CODE> 
            }; 
           ); 
+0

感謝。我已經按照上面的描述中的鏈接。可能是一個noob問題,但我要把代碼放在哪裏? – Bilocan

相關問題