2 window.onload=canvasMap;
4 var canvas = document.getElementById("canvasMap");
5 var ctx = canvas.getContext("2d");
6 var x = $("#movex").val();
7 var y = $("#movey").val();
8 var z = $("#movez").val();
9 var a = $("#movea").val();
12 ctx.fillStyle = "#808080";
13 ctx.arc(100,100,100,0,Math.PI*2,true);
18 canvas.addEventListener("mousedown",function(e){
21 url:"http://"+UrlElement['sendIpAddress']+
22 ":"+UrlElement['sendPortNumber']+
23 "/"+UrlElement['sendManufacturer']+
24 "/set/stagea?x="+encodeURIComponent(x)+
25 "&y="+encodeURIComponent(y)+
26 "&z="+encodeURIComponent(z)+
27 "&a="+encodeURIComponent(z),
28 success: function(data){
35 function canvasMapDraw(){
36 var step = (1/2000);//倍率変化はここの通知を変化
37 var canvas = document.getElementById("canvasMap");
38 var ctx = canvas.getContext("2d");
39 var x = $("#movex").val();
40 var y = $("#movey").val();
43 ctx.fillStyle = "#000000";
45 ctx.lineTo((parseInt(x)*step)+100,-(parseInt(y)*step)+100);
49 moveX = (parseInt(x)*step)+100;
50 moveY = -(parseInt(y)*step)+100;
52 else if(x !=0 || y!= 0){
54 ctx.fillStyle = "#000000";
55 ctx.moveTo(moveX,moveY);
56 ctx.lineTo((parseInt(x)*step)+100,-(parseInt(y)*step)+100);
60 moveX = (parseInt(x)*step)+100;
61 moveY = -(parseInt(y)*step)+100;