Start a new topic

Get X and Y of the Screen

Get X and Y of the Screen


Is it possible to get the get center of a phone's screen using x and y coordinates? I'm going to use the coordinates to position my markers. Thanks!

Hi Miguel,

Do you know the js properties 'width' and 'height'? You can access them through 'window.screen.width' and 'window.screen.height'. They return the actual screen size in either dimension. You just need to divide them by two and you know the center screen coordinates.

Best regards

Andreas

 
Login or Signup to post a comment