Create ol.Coordinate around goog.math.Coordinate

This commit is contained in:
Tom Payne
2012-07-19 10:34:12 +02:00
parent d62ba69458
commit c547404615
22 changed files with 155 additions and 131 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ goog.provide('ol.control.Drag');
goog.require('goog.events.EventType');
goog.require('goog.functions');
goog.require('ol.Control');
goog.require('ol.Coordinate');
goog.require('ol.MapBrowserEvent');
@@ -45,12 +46,12 @@ ol.control.Drag = function() {
this.offsetY = 0;
/**
* @type {goog.math.Coordinate}
* @type {ol.Coordinate}
*/
this.startCenter = null;
/**
* @type {goog.math.Coordinate}
* @type {ol.Coordinate}
*/
this.startCoordinate = null;
+2 -2
View File
@@ -1,6 +1,6 @@
goog.provide('ol.control.DragPan');
goog.require('goog.math.Coordinate');
goog.require('ol.Coordinate');
goog.require('ol.MapBrowserEvent');
goog.require('ol.control.Drag');
@@ -22,7 +22,7 @@ goog.inherits(ol.control.DragPan, ol.control.Drag);
ol.control.DragPan.prototype.handleDrag = function(mapBrowserEvent) {
var map = mapBrowserEvent.map;
var resolution = map.getResolution();
var center = new goog.math.Coordinate(
var center = new ol.Coordinate(
this.startCenter.x - resolution * this.deltaX,
this.startCenter.y + resolution * this.deltaY);
map.setCenter(center);