fixing compiler warning
This commit is contained in:
+1
-1
@@ -387,7 +387,7 @@ ol.Map.prototype.moveByPx = function(dx, dy) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.geom.Point} loc the location being requested
|
* @param {ol.geom.Point} loc the location being requested
|
||||||
* @returns {Object} the
|
* @returns {Array} the position of the location in pixel space
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.getViewportPosition = function(loc) {
|
ol.Map.prototype.getViewportPosition = function(loc) {
|
||||||
//TODO: delegate this to the renderers
|
//TODO: delegate this to the renderers
|
||||||
|
|||||||
+1
-3
@@ -3,8 +3,6 @@ goog.provide('ol.Popup');
|
|||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
goog.require('ol.Loc');
|
goog.require('ol.Loc');
|
||||||
goog.require('ol.Feature');
|
goog.require('ol.Feature');
|
||||||
//goog.require('goog.dom');
|
|
||||||
//goog.require('goog.style');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,7 +233,7 @@ ol.Popup.prototype.setAnchorOffset_ = function() {
|
|||||||
if (this.anchor_ instanceof ol.Feature) {
|
if (this.anchor_ instanceof ol.Feature) {
|
||||||
this.pos_ = this.anchor_.getGeometry().getCentroid();
|
this.pos_ = this.anchor_.getGeometry().getCentroid();
|
||||||
} else {
|
} else {
|
||||||
this.pos_ = this.anchor_;
|
this.pos_ = new ol.geom.Point(this.anchor_.getX(), this.anchor_.getY());
|
||||||
}
|
}
|
||||||
|
|
||||||
var popupPosPx = this.map_.getViewportPosition(this.pos_);
|
var popupPosPx = this.map_.getViewportPosition(this.pos_);
|
||||||
|
|||||||
Reference in New Issue
Block a user