| 67 | } |
| 68 | |
| 69 | GeoPointLocation ComputeLocation(const LocationPoint &point) { |
| 70 | const auto scale = 1 + (cScale() * style::DevicePixelRatio()) / 200; |
| 71 | const auto zoom = 13 + (scale - 1); |
| 72 | const auto w = st::locationSize.width() / scale; |
| 73 | const auto h = st::locationSize.height() / scale; |
| 74 | |
| 75 | auto result = GeoPointLocation(); |
| 76 | result.lat = point.lat(); |
| 77 | result.lon = point.lon(); |
| 78 | result.access = point.accessHash(); |
| 79 | result.width = w; |
| 80 | result.height = h; |
| 81 | result.zoom = zoom; |
| 82 | result.scale = scale; |
| 83 | return result; |
| 84 | } |
| 85 | |
| 86 | } // namespace Data |
no test coverage detected