0

I got a map, and some point on top of some canvas i declared. My canvas is set to be screen width/height long but my point is somehow cut It feels like the canvas starting point is set to be at some lower point than the top of the screen.. how can i change that?

var canvasPoint = document.getElementById("point");
var canvasRout = document.getElementById("rout");

canvasPoint.width = screen.width;
canvasPoint.height = screen.height;
canvasPoint.style.position = "absolute";

canvasRout.width = screen.width;
canvasRout.height = screen.height;
canvasRout.style.position = "absolute";

var ctx = canvasPoint.getContext("2d");
var rout = canvasRout.getContext("2d");

I wanted the point to be at the top left corner but i got the position at the following point in the pic.

0 Answers0