# include

return type | Array ( GeoJSON bounding box )
syntax | $.geo.include( null | Array bbox ( GeoJSON bounding box ), Array position ( GeoJSON position ) | Array bbox ( GeoJSON bounding box ) )

usage

    var bboxOfCoord = $.geo.include( null, [ -70, 42 ] );
    var sameAsSecondArgument = $.geo.include( null, [ -71, 41, -69, 43 ] );
    var includeCoord = $.geo.include( bbox, [ -70, 42 ] );
    var includeBbox = $.geo.include( bbox, [ -71, 41, -69, 43 ] );

The include method expands a bbox to include either a coordinate or another bbox. The expanded bbox is returned.

If the first argument is null or undefined, the result is a new bbox and will contain the second argument.

For efficency, if the first argument is a valid bbox, it is modified in-place and a reference is returned.

If the second argument is not a coordinate or bbox, this function returns the first argument.

This function is similar to Envelope.expandToInclude in JTS.