Class Index | File Index

Classes


Class khtml.maplib.geometry.Bounds


Defined in: Bounds.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
khtml.maplib.geometry.Bounds(southwest, northeast)
An area defined by 2 Points: southwest (bottom-left) and northeast (top-right) Boundaries: Latitude: +90° (North), -90° (South) Longitude: -180° (West), +180° (East)
Method Summary
Method Attributes Method Name and Description
 
 
distance(latdeg1, lngdeg1, latdeg2, lngdeg2)
Distance for two WGS84 points in meter.
 
enlarge(point)
If given point is outside the boundaries, enlarge boundaries to enclose the given point.
 
 
Diagonal distance of bounds, from southwest-point to northeast-point
 
Radius for max.
 
 
getZoomLevel(themap)
 
intersects(anotherBounds)
Check if another bound intersects this bounds.
 
ne()
Northeast / Top-Right
 
nw()
Northeast / Top-Left
 
se()
Southeast / Bottom-Right
 
sw()
Southwest / Bottom-Left
Class Detail
khtml.maplib.geometry.Bounds(southwest, northeast)
An area defined by 2 Points: southwest (bottom-left) and northeast (top-right) Boundaries: Latitude: +90° (North), -90° (South) Longitude: -180° (West), +180° (East)
Parameters:
{khtml.maplib.LatLng} southwest
{khtml.maplib.LatLng} northeast
Method Detail
createBoundsFrom2Points(p1, p2)
Parameters:
p1
p2

distance(latdeg1, lngdeg1, latdeg2, lngdeg2)
Distance for two WGS84 points in meter.
Parameters:
latdeg1
lngdeg1
latdeg2
lngdeg2

enlarge(point)
If given point is outside the boundaries, enlarge boundaries to enclose the given point.
Parameters:
{khtml.maplib.LatLng} point

{khtml.maplib.LatLng} getCenter()
Returns:
{khtml.maplib.LatLng}

getDistance()
Diagonal distance of bounds, from southwest-point to northeast-point

{int} getInnerRadius()
Radius for max. possible circle inside this box.
Returns:
{int}

{khtml.maplib.LatLng} getOpticalCenter(themap)
Parameters:
{khtml.maplib.base.Map} themap
Returns:
{khtml.maplib.LatLng}

{int} getZoomLevel(themap)
Parameters:
{khtml.maplib.base.Map} themap
Returns:
{int}

intersects(anotherBounds)
Check if another bound intersects this bounds. Algorithm: check if any of the bounds edges is within this bounds area. TODO: could you do it simpler? http://tekpool.wordpress.com/2006/10/11/rectangle-intersection-determine-if-two-given-rectangles-intersect-each-other-or-not/ TODO: probably won't work for rotated rectangles, make it work! Ticket: #357
Parameters:
{khtml.maplib.geometry.Bounds} anotherBounds

{khtml.maplib.LatLng} ne()
Northeast / Top-Right
Returns:
{khtml.maplib.LatLng}

{khtml.maplib.LatLng} nw()
Northeast / Top-Left
Returns:
{khtml.maplib.LatLng}

{khtml.maplib.LatLng} se()
Southeast / Bottom-Right
Returns:
{khtml.maplib.LatLng}

{khtml.maplib.LatLng} sw()
Southwest / Bottom-Left
Returns:
{khtml.maplib.LatLng}

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Oct 09 2011 20:46:56 GMT+0200 (MESZ)