We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 639ccfd commit 1c56308Copy full SHA for 1c56308
src/geo/lng_lat_bounds.js
@@ -215,7 +215,7 @@ class LngLatBounds {
215
* @returns {boolean} True if the point is within the bounding box.
216
*/
217
contains(lnglat: LngLatLike) {
218
- lnglat = lnglat instanceof LngLat ? new LngLat(lnglat.lng, lnglat.lat) : LngLat.convert(lnglat);
+ lnglat = LngLat.convert(lnglat);
219
220
const containsLatitude = this._sw.lat <= lnglat.lat && lnglat.lat <= this._ne.lat;
221
let containsLongitude = this._sw.lng <= lnglat.lng && lnglat.lng <= this._ne.lng;
0 commit comments