Class Geokit::Bounds
In: lib/geokit/mappable.rb
Parent: Object

Bounds represents a rectangular bounds, defined by the SW and NE corners

Methods

Attributes

ne  [RW]  sw and ne are LatLng objects
sw  [RW]  sw and ne are LatLng objects

Public Class methods

returns an instance of bounds which completely encompases the given circle

provide sw and ne to instantiate a new Bounds instance

Takes two main combinations of arguments to create a bounds: point,point (this is the only one which takes two arguments [point,point] . . . where a point is anything LatLng#normalize can handle (which is quite a lot)

NOTE: everything combination is assumed to pass points in the order sw, ne

Public Instance methods

Returns true if the candidate object is logically equal. Logical equivalence is true if the lat and lng attributes are the same for both objects.

returns the a single point which is the center of the rectangular bounds

Returns true if the bounds contain the passed point. allows for bounds which cross the meridian

returns true if the bounds crosses the international dateline

a two-element array of two-element arrays: sw,ne

a simple string representation:sw,ne

Equivalent to Google Maps API‘s .toSpan() method on GLatLng‘s.

Returns a LatLng object, whose coordinates represent the size of a rectangle defined by these bounds.

[Validate]