GpsGate Server JavaScript API

Geo  1.0.0

GpsGate Server JavaScript API > Geo > Franson.Geo.Bounds
Search:
 
Filters

Class Franson.Geo.Bounds

Similar interface as Google's GLatLngBounds either initialize with no params or two. todo: logic for when to normalize data? todo: hmm, base this on a "generic" bounds? todo: overload constructor to be able to take latlngs as input? todo: datum wrap...

Constructor

Franson.Geo.Bounds([sw], [ne])
Parameters:
[sw] <LatLng> South West // todo: hmm, since we now use extend() to add these it doesn't matter if they actually are sw or ne, could be any coords.
[ne] <LatLng> North East

Properties

_max - private LatLng

lr

_min - private LatLng

ul

Methods

containsBounds

boolean containsBounds(bounds)
Parameters:
bounds <Franson.Geometry.Bounds>
Returns: boolean

containsLatLng

boolean containsLatLng(latlng)
Parameters:
latlng <LatLng>
Returns: boolean

extend

self extend(latlng)
see GLatLngBounds.extend() todo: allow iterable as input? + take other bounds as input? (other method?)
Parameters:
latlng <LatLng>
Returns: self
Chainable: This method is chainable.

getCenter

LatLng getCenter()
Returns: LatLng

getNorthEast

LatLng getNorthEast()
Returns: LatLng

getSouthWest

LatLng getSouthWest()
Returns: LatLng

intersects

boolean intersects(bounds)
see GLatLngBounds.intersects() see also Franson.Geo.intersects() for a tri-state version of this.
Parameters:
bounds <Franson.Geometry.Bounds>
Returns: boolean

isEmpty

boolean isEmpty()
Returns: boolean

toSpan

LatLng toSpan()
Returns: LatLng


Copyright © 2009 Franson Technology AB, Sweden. All rights reserved.