$("#myCanvas").mousemove(function (e) {
mouse_x = e.pageX + document.documentElement.scrollTop;
mouse_y = e.pageY + document.documentElement.scrollLeft;
});
$(function(){
$("#myCanvas").mousewheel(function(event, delta){
cxt.clearRect ( (-1)*c.width , (-1)*c.height , c.width*2, c.height*2 );
for ( var i = 0 ; i < data.length ; i ++ ){
cxt.fillStyle="#FF0000";
cxt.beginPath();
cxt.arc((parseFloat(data[i].longitude)-baselong)*disratio+moved_x,(parseFloat(data[i].latitude)-baselati)*disratio+moved_y,(parseFloat(data[i].RSSI))*(-1)*levelratio,0,Math.PI*2,true);
cxt.closePath();
cxt.fill();
}
var scaleratio = 0.1 ;
if ( delta > 0)
cxt.translate((-1)*mouse_x*scaleratio, (-1)*mouse_y*scaleratio);
else if ( delta < 0 )
cxt.translate(mouse_x*scaleratio, mouse_y*scaleratio);
cxt.scale(1+(delta*scaleratio),1+(delta*scaleratio));
});
});