Redefine ol.Coordinate to be Array.<number>

This commit is contained in:
Tom Payne
2013-04-04 19:39:18 +02:00
parent 6fc86b81c7
commit 02196c94b5
74 changed files with 613 additions and 687 deletions

View File

@@ -4,8 +4,8 @@ goog.provide('ol.interaction.KeyboardPan');
goog.require('goog.events.KeyCodes');
goog.require('goog.events.KeyHandler.EventType');
goog.require('ol.Coordinate');
goog.require('ol.View2D');
goog.require('ol.coordinate');
goog.require('ol.interaction.Interaction');
@@ -67,8 +67,8 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
} else {
deltaY = mapUnitsDelta;
}
var delta = new ol.Coordinate(deltaX, deltaY);
delta.rotate(rotation);
var delta = [deltaX, deltaY];
ol.coordinate.rotate(delta, rotation);
view.pan(map, delta, ol.interaction.KEYBOARD_PAN_DURATION);
keyEvent.preventDefault();
mapBrowserEvent.preventDefault();