2010-10-08 241 views

回答

5

下面是如何獲得像素或海龍您在場景中的位置座標:

obj = new Seadragon.Viewer(targetId) 
obj.viewer.tracker.pressHandler = function(tracker, position) { 
     console.log('pressHandler', position.x, position.y); 
     obj.location = new Seadragon.Point(
       parseInt(position.x), 
       parseInt(position.y) 
     ); 
     var pointPos = obj.view.viewport.pointFromPixel(obj.location); 
}; 

希望這有助於

+0

w00t!非常感謝。 – 2010-10-15 11:41:22