Class: Bounds

cercalia.Bounds


Class for boundingbox. It's a rectangle with geographical coordinates (WGS84):
[left, bottom, right, top]

new cercalia.Bounds(opt_arrCoord)

src/cercalia/bounds.js, line 19
Name Type Description
arrCoord Array.<number>

Coordinates [left, bottom, right, top]

Extends

Methods

add(x, y){cercalia.Bounds}

src/cercalia/bounds.js, line 307

Move the limits horizontally and vertically

Name Type Description
x number

Displacement X axis

y number

Displacement Y axis

Returns:
Bounds after add

clear()

src/cercalia/bounds.js, line 64

Cleans the object bounds. It reinitializes.

clone(){cercalia.Bounds}

src/cercalia/bounds.js, line 177

Object clonation.

Returns:
Object clone.

cloneIncreasingPercentage(percentage){cercalia.Bounds}

src/cercalia/bounds.js, line 205
Name Type Description
percentage number

to increase for every limit (top, bottom, left, right)

Returns:
Returns the object 'cercalia.Bounds' increased

contains(x, y, opt_inclusive){boolean}

src/cercalia/bounds.js, line 383

Returns if it's inside the object bounds del objeto

Name Type Description
x number | undefined

Latitude.

y number | undefined

Longitude.

inclusive boolean

Inclusive, with the bounds.

Returns:
Returns if it's inside the object bounds.

containsBounds(bounds, partial, inclusive){boolean}

src/cercalia/bounds.js, line 492
Name Type Description
bounds cercalia.Bounds

Bounds.

partial boolean

If one destination corner is inside the bounds consider contains the bounds. The default value is false. If false, all the destination bounds must be inside this bounds.

inclusive boolean

Include edges. Default value: true

Returns:
Returns if contains bounds inside object

containsLonLat(lonLat){boolean}

src/cercalia/bounds.js, line 369

Returns true if a coordinate (cercalia.LonLat object) is inside the bounds

Name Type Description
lonLat cercalia.LonLat

Coordinate.

Returns:
true or false.

equals(bounds){boolean}

src/cercalia/bounds.js, line 222
Name Type Description
bounds cercalia.Bounds

Bounds to compare

Returns:
Returns if bounds have the same limits

extend(boundsOrLonLat)

src/cercalia/bounds.js, line 316

Expand the limits for including coordinates {ol.Coordinate} or more limits {cercalia.Bounds}.

Name Type Description
boundsOrLonLat cercalia.LonLat | cercalia.Bounds | null

cercalia.Bounds or cercalia.LonLat to extend current bounds

extendXY(x, y)

src/cercalia/bounds.js, line 345

Expand the limits for including the coordinate XY {ol.Coordinate}

Name Type Description
x number

Longitud

y number

Latitud

getBottom(){number|undefined}

src/cercalia/bounds.js, line 103

Returns the lower limit for Y axis.

Returns:
bottom

getCenterLonLat(){cercalia.LonLat|undefined}

src/cercalia/bounds.js, line 293

Returns the bounds center

Returns:
Map center

getClass(){string} inherited

src/cercalia/object.js, line 41
Returns:
Get Class name of object

getDouble(){cercalia.Bounds}

src/cercalia/bounds.js, line 186

Returns an object increasing (x0.5) all the limits (top, bottom, left, right)

Returns:
bounds

getHeight(){number}

src/cercalia/bounds.js, line 275

Height - limits.

Returns:
Height bounds

getHeightInMeters(){number|undefined}

src/cercalia/bounds.js, line 578
Returns:
Bounds height distance in meters.

getId(){string} inherited

src/cercalia/object.js, line 33
Returns:
Unique Id.

getLeft(){number|undefined}

src/cercalia/bounds.js, line 112

Returns the left limit for X axis.

Returns:
left

getNorthEast(){cercalia.LonLat|undefined}

src/cercalia/bounds.js, line 143

Returns the NorthEast coordinate

Returns:
array NorthEast coordinate

getNorthWest(){cercalia.LonLat|undefined}

src/cercalia/bounds.js, line 121

Returns the NorthWest coordinate

Returns:
Northwest coordinate

getRight(){number|undefined}

src/cercalia/bounds.js, line 94

Returns the right limit for X axis.

Returns:
right

getSize(){Array.<number>}

src/cercalia/bounds.js, line 284

Array with size limits [width,height]

Returns:
Size bounds [width, height]

getSouthEast(){cercalia.LonLat|undefined}

src/cercalia/bounds.js, line 154

Returns the SouthEast coordinate

Returns:
SouthEast coordinate

getSouthWest(){cercalia.LonLat|undefined}

src/cercalia/bounds.js, line 132

Returns the Southwest coordinate

Returns:
Southwest coordinate

getTop(){number|undefined}

src/cercalia/bounds.js, line 85

Returns the top limit for Y axis.

Returns:
top

getWidth(){number}

src/cercalia/bounds.js, line 266

Width - limits.

Returns:
Bounds width

getWidthInMeters(){number|undefined}

src/cercalia/bounds.js, line 566
Returns:
Bounds width distance in meters.

intersectsBounds(bounds, options){boolean}

src/cercalia/bounds.js, line 416

Determina si unos limites intersecta con los limites del objeto actual. Se considera que intersectan si uno de sus aristas se encuentran dentro de los limites del otro

Name Type Description
bounds cercalia.Bounds

Bounds

options Object

Options

Returns:
true if bounds intersects.

isEmpty(){boolean}

src/cercalia/bounds.js, line 76
Returns:
Returns if bounds are empty. (Have not been initialized)

toArray(){Array.<number>}

src/cercalia/bounds.js, line 249
Returns:
Returns an array with the bounds. Format: [left, bottom, right, top]

toBBOX(){string}

src/cercalia/bounds.js, line 257
Returns:
Returns BoundingBox-String '0.41,41.24,0.541,40.51'

toString(){string}

src/cercalia/bounds.js, line 241

Returns the object in string [left, bottom, right, top]

Returns:
Returns a string with the bounds. Format: 'left,bottom,right,top'

transformExtent(projectionCode){ol.Extent}

src/cercalia/bounds.js, line 592

Transform bounds to ol.Extent

Name Type Description
projectionCode string

Projection code to transform.

Returns:
Extention reprojected.

wrapDateLine(maxExtent, opt_options){cercalia.Bounds}

src/cercalia/bounds.js, line 528
Name Type Description
maxExtent cercalia.Bounds

Max extent

options cercalia.Bounds.wrapDateLineOptions

Optional value. options.leftTolerance|options.rightTolerance

Returns:
Bounds