Skip to main content
added 98 characters in body
Source Link
Alešinar
  • 914
  • 5
  • 19

Your error says that the view is not defined. Somewhere in the code that you DIDN'T post, you should define it or store it in the correct variable. In the posted code, the view is stored in a variable called vista I guess as you call vista.getResolution();.

Otherwise, if you are looking for help with the code that does not work, you should post the code that does not work, not the working example:)

EDIT:

It should be const viewResolution = /** @type {number} */ (vista.getResolution());

Your error says that the view is not defined. Somewhere in the code that you DIDN'T post, you should define it or store it in the correct variable. In the posted code, the view is stored in a variable called vista I guess as you call vista.getResolution();.

Otherwise, if you are looking for help with the code that does not work, you should post the code that does not work, not the working example:)

Your error says that the view is not defined. Somewhere in the code that you DIDN'T post, you should define it or store it in the correct variable. In the posted code, the view is stored in a variable called vista I guess as you call vista.getResolution();.

Otherwise, if you are looking for help with the code that does not work, you should post the code that does not work, not the working example:)

EDIT:

It should be const viewResolution = /** @type {number} */ (vista.getResolution());

Source Link
Alešinar
  • 914
  • 5
  • 19

Your error says that the view is not defined. Somewhere in the code that you DIDN'T post, you should define it or store it in the correct variable. In the posted code, the view is stored in a variable called vista I guess as you call vista.getResolution();.

Otherwise, if you are looking for help with the code that does not work, you should post the code that does not work, not the working example:)