Getting explicit about pixels and size.

Eventually, well have to ask renderers for all pixel and size related stuff.  And the map overlay renderer will do all pixel<->loc math.  For now, we let the map do this math based on its viewport - as this is where the mouse events are handled and it is pixels relative to the viewport that are being generated.  For now, the getViewportPixelForLoc and getLocForViewportPixel are now more explicitly named.
This commit is contained in:
Tim Schaub
2012-07-08 20:57:36 -06:00
parent 3d130d3325
commit 5a485ea856
5 changed files with 50 additions and 58 deletions

View File

@@ -55,7 +55,7 @@ ol.control.Navigation.prototype.deactivate = function() {
* @param {Object} evt
*/
ol.control.Navigation.prototype.moveMap = function(evt) {
this.map_.moveByPx(evt.deltaX, evt.deltaY);
this.map_.moveByViewportPx(evt.deltaX, evt.deltaY);
return false;
};