Function
getLayoutStylesByPosition
(mapCanvasProjection, offset, position)
Source from the content-addressed store, hash-verified
| 70 | } |
| 71 | |
| 72 | function 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 | |
| 89 | function getLayoutStyles(mapCanvasProjection, offset, props) { |
| 90 | if (props.bounds) { |
Tested by
no test coverage detected