-
Name Type Description arrCoord
Array.<number> Coordinates
[left, bottom, right, top]
. Coordinates inEPSG:4326
projection.{boundsOptions}
Bounds options. Default:
undefined
.Name Type Description animation
boolean Animation.
bearing
number Map bearing
duration
number Duration if animation is enabled. Default
2000
.maxZoom
number Maximum zoom level when fitting the bounds.
padding
number | module:cercaliagl/Bounds~BoundsPadding Padding in pixels from the bounds to the map canvas.
pitch
number Map pitch.
Methods
-
Move the limits horizontally and vertically
Name Type Description x
number Displacement X axis
y
number Displacement Y axis
Returns:
Bounds after add
-
Cleans the object bounds. It reinitializes.
-
Clone object
Returns:
Object cloned
-
Name Type Description percentage
number to increase for every limit (top, bottom, left, right)
Returns:
Returns the object 'Bounds' increased
-
Returns if it's inside the object bounds del objeto
Name Type Description x
number | undefined Latitude.
y
number | undefined Longitude.
inclusive
boolean (defaults to true) Inclusive, with the bounds.
Returns:
Returns if it's inside the object bounds.
-
Name Type Description bounds
module:cercaliagl/Bounds~Bounds Bounds.
partial
boolean (defaults to false) 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 (defaults to true) Include edges. Default value: true
Returns:
Returns if contains bounds inside object
-
Returns true if a coordinate (LonLat object) is inside the bounds
Name Type Description lonLat
module:cercaliagl/LonLat~LonLat Coordinate.
Returns:
true
orfalse
.
-
Name Type Description bounds
module:cercaliagl/Bounds~Bounds Bounds to compare
Returns:
Returns if bounds have the same limits
-
Expand the limits for including coordinates {ol.Coordinate} or more limits {Bounds}.
Name Type Description boundsOrLonLat
module:cercaliagl/LonLat~LonLat | module:cercaliagl/Bounds~Bounds | null Bounds
orLonLat
to extend current bounds -
Expand the limits for including the coordinate XY. Format
[x, y]
Name Type Description x
number Longitud
y
number Latitud
-
Returns the lower limit for Y axis.
Returns:
bottom
-
Returns the Bounds Options
Returns:
Bounds Options
-
Returns the bounds center
Returns:
Map center
-
Returns an object increasing (
* 0.5
) all the limits (top, bottom, left, right).Returns:
bounds doubled by 0.5 for each limit.
-
Height limits.
Returns:
Height bounds
-
Get height width distance in meters.
Returns:
Bounds height distance in meters.
-
Returns the left limit for X axis.
Returns:
left
-
Returns the North East coordinate
Returns:
array NorthEast coordinate
-
Returns the North West coordinate
Returns:
Northwest coordinate
-
Returns the right limit for X axis.
Returns:
right
-
Array with size limits
[width,height]
Returns:
Size bounds[width, height]
-
Returns the South East coordinate
Returns:
SouthEast coordinate
-
Returns the South West coordinate
Returns:
Southwest coordinate
-
Returns the top limit for Y axis.
Returns:
top
-
Width limits
Returns:
Bounds width
-
Get bounds width distance in meters.
Returns:
Bounds width distance in meters.
-
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
module:cercaliagl/Bounds~Bounds Bounds
options
Object Options
Returns:
true
if bounds intersects.
-
Check if bounds are emty or have been initialized yet.
Returns:
true
if empty, elsefalse
.
-
Sets the Bounds options
Name Type Description boundsOptions
Name Type Description animation
boolean Animation.
bearing
number Map bearing
duration
number Duration if animation is enabled. Default
2000
.maxZoom
number Maximum zoom level when fitting the bounds.
padding
number | module:cercaliagl/Bounds~BoundsPadding Padding in pixels from the bounds to the map canvas.
pitch
number Map pitch.
-
Returns:
Returns an array with the bounds. Format: [left, bottom, right, top]
-
Returns:
Returns BoundingBox-String '0.41,41.24,0.541,40.51'
-
Convert bounds to double array. Format:
[[left, bottom], [right, top]]
-
Returns the object in string [left, bottom, right, top]
Returns:
Returns a string with the bounds. Format: 'left,bottom,right,top'
-
Returns:
Returns BoundingBox in WKT format
-
Name Type Description maxExtent
module:cercaliagl/Bounds~Bounds Max extent
options
Optional value.
options.leftTolerance|options.rightTolerance
Name Type Description leftTolerance
number | undefined rightTolerance
number | undefined Returns:
Bounds