title: Openlayers 5 How to watch for view.center changes
body: <p>I'm currently working on a project to use openlayers 5's observable to observe some items in the map and respond accordingly. </p>
  
  <p><a href="http://openlayers.org/en/latest/apidoc/module-ol_Observable-Observable.html" rel="nofollow noreferrer">http://openlayers.org/en/latest/apidoc/module-ol_Observable-Observable.html</a></p>
  
  <p>What I want to do is every time the view's center changes, I want to call a function. I'm doing this currently (but its not working).</p>
  
  <pre><code>view.on('center', function(event){
      // do something with the center
  });
  </code></pre>
  
  <p>Any tips?</p>