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

Function getLayoutStylesByPosition

lib/utils/OverlayViewHelper.js:72–87  ·  view source on GitHub ↗
(mapCanvasProjection, offset, position)

Source from the content-addressed store, hash-verified

70}
71
72function getLayoutStylesByPosition(mapCanvasProjection, offset, position) {
73 var point = mapCanvasProjection.fromLatLngToDivPixel(position)
74 if (point) {
75 var x = point.x,
76 y = point.y
77
78 return {
79 left: x + offset.x + "px",
80 top: y + offset.y + "px",
81 }
82 }
83 return {
84 left: "-9999px",
85 top: "-9999px",
86 }
87}
88
89function getLayoutStyles(mapCanvasProjection, offset, props) {
90 if (props.bounds) {

Callers 1

getLayoutStylesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected