VisibleRegion Class
April 10, 2018 ยท View on GitHub
let visibleRegion: VisibleRegion = this.map.getVisibleRegion();
Instance properties
| Params | Type | Details |
|---|---|---|
| northeast | ILatLng | The northeast of the bounds that contains the farLeft, farRight, nearLeft and nearRight. Since the map view is able to rotate, the farRight is not the same as the northeast. |
| southwest | ILatLng | The southwest of the bounds that contains the farLeft, farRight, nearLeft and nearRight. Since the map view is able to rotate, the nearLeft is not the same as the southwest. |
| farLeft | ILatLng | The farLeft indicates the lat/lng of the top-left of the map view. |
| farRight | ILatLng | The farRight indicates the lat/lng of the top-right of the map view. |
| nearLeft | ILatLng | The nearLeft indicates the lat/lng of the bottom-left of the map view. |
| nearRight | ILatLng | The nearRight indicates the lat/lng of the bottom-left of the map view. |
| type | string | `VisibleRegion` |
Instance methods
toString()
Converts to string
:arrow_right: Returns string
toUrlValue(precision?)
Returns a string of the form "lat_sw,lng_sw,lat_ne,lng_ne" for this bounds, where "sw" corresponds to the southwest corner of the bounding box, while "ne" corresponds to the northeast corner of that box.
| Params | Type | Details |
|---|---|---|
| precision | number | (optional)precision. Default is 6 |
:arrow_right: Returns string
contains(latLng)
Returns true if the given lat/lng is in this bounds.
| Params | Type | Details |
|---|---|---|
| latLng | ILatLng | point |
:arrow_right: Returns boolean