MCPcopy Create free account
hub / github.com/tomchentw/react-google-maps / getLayoutStyles

Function getLayoutStyles

src/utils/OverlayViewHelper.js:71–87  ·  view source on GitHub ↗
(mapCanvasProjection, offset, props)

Source from the content-addressed store, hash-verified

69}
70
71export function getLayoutStyles(mapCanvasProjection, offset, props) {
72 if (props.bounds) {
73 const bounds = ensureOfType(
74 props.bounds,
75 google.maps.LatLngBounds,
76 createLatLngBounds
77 )
78 return getLayoutStylesByBounds(mapCanvasProjection, offset, bounds)
79 } else {
80 const position = ensureOfType(
81 props.position,
82 google.maps.LatLng,
83 createLatLng
84 )
85 return getLayoutStylesByPosition(mapCanvasProjection, offset, position)
86 }
87}

Callers 2

onPositionElementMethod · 0.90
onPositionElementMethod · 0.90

Calls 3

ensureOfTypeFunction · 0.70
getLayoutStylesByBoundsFunction · 0.70

Tested by

no test coverage detected