apply patch-3531-A0.diff from trac ticket #3531
This commit is contained in:
@@ -1242,11 +1242,11 @@ OpenLayers.Layer = OpenLayers.Class({
|
||||
* {<OpenLayers.Pixel>} An <OpenLayers.Pixel> which is the passed-in
|
||||
* <OpenLayers.LonLat>,translated into view port pixels.
|
||||
*/
|
||||
getViewPortPxFromLonLat: function (lonlat) {
|
||||
getViewPortPxFromLonLat: function (lonlat, resolution) {
|
||||
var px = null;
|
||||
if (lonlat != null) {
|
||||
var resolution = this.map.getResolution();
|
||||
var extent = this.map.getExtent();
|
||||
resolution = resolution || this.map.getResolution();
|
||||
var extent = this.map.calculateBounds(null, resolution);
|
||||
px = new OpenLayers.Pixel(
|
||||
(1/resolution * (lonlat.lon - extent.left)),
|
||||
(1/resolution * (extent.top - lonlat.lat))
|
||||
|
||||
Reference in New Issue
Block a user