aronstrandberg / mvk15

MVK Project: Data Collection Using a Drone, and Graphical Representation via MVC
4 stars 0 forks source link

Only pan camera when drone reaches edge #33

Closed aronstrandberg closed 8 years ago

aronstrandberg commented 9 years ago

Right now the camera pans to the new dot every time one is drawn, making for slow performance and hacky animations. Only panning when really necessary might improve this.

karlek commented 9 years ago

By camera, are you referring to the viewport of the Google maps iframe?

Is there a possibility to check the where in the viewport our coordinate tag will created? If so, then we can check the distance from the border of the viewport to the tag and if it's bigger than a certain value we make a smooth transition to the new position.

karlek commented 9 years ago

Haha is referring to SO a bad habit? Anyways found this untested code snippet for getting the long / lats of the viewport.

https://stackoverflow.com/questions/14285963/google-maps-get-viewport-latitude-and-longitude

aronstrandberg commented 9 years ago

Yes, exactly. I'm pretty sure this is trivial and that the API has built-in methods to do this, I just wrote it up so I don't forget it.

karlek commented 9 years ago

@aronstrandberg implement today? I'm in META at 12 today.

aronstrandberg commented 9 years ago

It's difficult to test this without new data points streaming over time, so we either need that to work or bring back the faked ones