From d8b527776a48aa0e251a24485616f5440229f808 Mon Sep 17 00:00:00 2001 From: Mike Adair Date: Fri, 22 Jun 2012 11:26:09 -0400 Subject: [PATCH] fixing compiler warning --- src/ol/Map.js | 2 +- src/ol/Popup.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ol/Map.js b/src/ol/Map.js index fae064f055..0f0f8f0cda 100644 --- a/src/ol/Map.js +++ b/src/ol/Map.js @@ -387,7 +387,7 @@ ol.Map.prototype.moveByPx = function(dx, dy) { /** * @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) { //TODO: delegate this to the renderers diff --git a/src/ol/Popup.js b/src/ol/Popup.js index 9393200d03..25f7f3fafa 100644 --- a/src/ol/Popup.js +++ b/src/ol/Popup.js @@ -3,8 +3,6 @@ goog.provide('ol.Popup'); goog.require('ol.Map'); goog.require('ol.Loc'); 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) { this.pos_ = this.anchor_.getGeometry().getCentroid(); } else { - this.pos_ = this.anchor_; + this.pos_ = new ol.geom.Point(this.anchor_.getX(), this.anchor_.getY()); } var popupPosPx = this.map_.getViewportPosition(this.pos_);