diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index 46b992961d..5a527ca02a 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -359,7 +359,8 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: containsLonLat * * Parameters: - * ll - {} + * ll - {|Object} OpenLayers.LonLat or an + * object with a 'lon' and 'lat' properties. * options - {Object} Optional parameters * * Acceptable options: @@ -382,13 +383,12 @@ OpenLayers.Bounds = OpenLayers.Class({ worldBounds = options.worldBounds; if (worldBounds && !contains) { var worldWidth = worldBounds.getWidth(); - ll = ll.clone(); var worldCenterX = (worldBounds.left + worldBounds.right) / 2; var worldsAway = Math.round((ll.lon - worldCenterX) / worldWidth); - ll.lon -= (worldsAway * worldWidth); - contains = this.containsLonLat( - ll, {inclusive: options.inclusive} - ); + contains = this.containsLonLat({ + lon: ll.lon - worldsAway * worldWidth, + lat: ll.lat + }, {inclusive: options.inclusive}); } return contains; }, diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index 75dd5ff20d..27928a2b47 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -267,7 +267,8 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * Determins whether the feature intersects with the specified location. * * Parameters: - * lonlat - {} + * lonlat - {|Object} OpenLayers.LonLat or an + * object with a 'lon' and 'lat' properties. * toleranceLon - {float} Optional tolerance in Geometric Coords * toleranceLat - {float} Optional tolerance in Geographic Coords * diff --git a/lib/OpenLayers/Geometry.js b/lib/OpenLayers/Geometry.js index 888f73b83e..f199e3fa35 100644 --- a/lib/OpenLayers/Geometry.js +++ b/lib/OpenLayers/Geometry.js @@ -176,7 +176,8 @@ OpenLayers.Geometry = OpenLayers.Class({ * geometry. * * Parameters: - * lonlat - {} + * lonlat - {|Object} OpenLayers.LonLat or an + * object with a 'lon' and 'lat' properties. * toleranceLon - {float} Optional tolerance in Geometric Coords * toleranceLat - {float} Optional tolerance in Geographic Coords *