new cercalia.Bounds(arrCoord)
Name | Type | Description |
---|---|---|
arrCoord |
Array.<number> |
Coordinates [left, bottom, right, top] |
Methods
-
add(x, y){cercalia.Bounds}
-
Move the limits horizontally and vertically
Name Type Description x
number Displacement X axis
y
number Displacement Y axis
-
clear()
-
Cleans the object bounds. It reinitializes.
-
clone(){cercalia.Bounds}
-
Object clonation.
Returns:
Object clone.
-
cloneIncreasingPercentage(p_percentage){cercalia.Bounds}
-
Name Type Description p_percentage
number to increase for every limit (top, bottom, left, right)
Returns:
Returns the object 'cercalia.Bounds' increased
-
contains(x, y, inclusive){boolean}
-
Returns Devuelve si una coordenada se encuentra dentro de los límites del objeto
Name Type Description x
number Latitude.
y
number Longitude.
inclusive
boolean Inclusive, with the bounds.
Returns:
Returns if it's inside the object bounds.
-
containsBounds(bounds, partial, inclusive){boolean}
-
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}
-
Returns true if a coordinate (cercalia.LonLat object) is inside the bounds
Name Type Description lonLat
cercalia.LonLat Coordinate.
Returns:
true
orfalse
.
-
equals(bounds){boolean}
-
Name Type Description bounds
cercalia.Bounds Returns:
Returns if bounds have the same limits
-
extend(object)
-
Expand the limits for including coordinates {ol.Coord} or more limits {cercalia.Bounds}.
Name Type Description object
cercalia.LonLat | cercalia.Bounds -
extendXY(x, y)
-
Expand the limits for including the coordinate XY {ol.Coord}
Name Type Description x
number Longitud
y
number Latitud
-
getBottom(){number}
-
Returns the lower limit for Y axis.
Returns:
bottom
-
getCenterLonLat(){cercalia.LonLat}
-
Returns the bounds center
Returns:
Map center
-
getClass(){string}
-
Returns the object type.
-
getDouble(){cercalia.Bounds}
-
Returns an object increasing (x0.5) all the limits (top, bottom, left, right)
Returns:
bounds
-
getHeight(){number}
-
Height - limits.
Returns:
Height bounds
-
getHeightInMeters()
-
Returns:
distance Bounds height distance in meters.
-
getLeft(){number}
-
Returns the left limit for X axis.
Returns:
left
-
getNorthEast(){Array.<number>}
-
Returns the NorthEast coordinate
Returns:
array NorthEast coordinate
-
getNorthWest(){cercalia.LonLat}
-
Returns the NorthWest coordinate
Returns:
Northwest coordinate
-
getRight(){number}
-
Returns the right limit for X axis.
Returns:
right
-
getSize(){number}
-
Array with size limits
[width,height]
Returns:
Size bounds[width, height]
-
getSouthEast(){cercalia.LonLat}
-
Returns the SouthEast coordinate
Returns:
SouthEast coordinate
-
getSouthWest(){cercalia.LonLat}
-
Returns the Southwest coordinate
Returns:
Southwest coordinate
-
getTop(){number}
-
Returns the top limit for Y axis.
Returns:
top
-
getWidth(){number}
-
Width - limits.
Returns:
Bounds width
-
getWidthInMeters()
-
Returns:
distance Bounds width distance in meters.
-
intersectsBounds(bounds, options){boolean}
-
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 options
Object -
isEmpty(){boolean}
-
Returns:
Returns if bounds are empty. (Have not been initialized)
-
toArray(){Array}
-
Returns:
Returns an array with the bounds. Format: [left, bottom, right, top]
-
toBBOX(){string}
-
Returns:
Returns BoundingBox-String "0.41,41.24,0.541,40.51"
-
toString(){string}
-
Returns the object in string [left, bottom, right, top]
Returns:
Returns a string with the bounds. Format: "left,bottom,right,top"
-
wrapDateLine(maxExtent, options){cercalia.Bounds}
-
Name Type Description maxExtent
cercalia.Bounds options
Object options.leftTolerance|options.rightTolerance