convert static method

LngLatBounds convert(
  1. dynamic input
)

Converts an array to a LngLatBounds object.

If a LngLatBounds object is passed in, the function returns it unchanged.

Internally, the function calls LngLat#convert to convert arrays to LngLat values.

@param {LngLatBoundsLike} input An array of two coordinates to convert, or a LngLatBounds object to return. @returns {LngLatBounds} A new LngLatBounds object, if a conversion occurred, or the original LngLatBounds object. @example var arr = [-73.9876, 40.7661, -73.9397, 40.8002]; var llb = mapboxgl.LngLatBounds.convert(arr); llb; // = LngLatBounds {_sw: LngLat {lng: -73.9876, lat: 40.7661}, _ne: LngLat {lng: -73.9397, lat: 40.8002}}

Implementation

static LngLatBounds convert(dynamic input) =>
    LngLatBounds.fromJsObject(LngLatBoundsJsImpl.convert(input));