MCPcopy Create free account
hub / github.com/react-native-maps/react-native-maps / boundingBoxForRegion

Method boundingBoxForRegion

src/MapView.tsx:1059–1070  ·  view source on GitHub ↗

* Get bounding box from region * * @param region Region * * @return Object Object bounding box ({ northEast: , southWest: })

(region: Region)

Source from the content-addressed store, hash-verified

1057 * @return Object Object bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
1058 */
1059 boundingBoxForRegion(region: Region): BoundingBox {
1060 return {
1061 northEast: {
1062 latitude: region.latitude + region.latitudeDelta / 2,
1063 longitude: region.longitude + region.longitudeDelta / 2,
1064 },
1065 southWest: {
1066 latitude: region.latitude - region.latitudeDelta / 2,
1067 longitude: region.longitude - region.longitudeDelta / 2,
1068 },
1069 };
1070 }
1071
1072 // @ts-ignore
1073 private _getHandle() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected