mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:20:04 +00:00
Updating MapLibre Native to the latest version (2023-04-28)
This commit is contained in:
parent
271756bba9
commit
8e8567a48f
5 changed files with 12 additions and 8 deletions
|
|
@ -58,12 +58,14 @@ void DrawItem::UseDefaultProjection(
|
|||
static glm::vec2
|
||||
LatLongToScreenCoordinate(const QMapLibreGL::Coordinate& coordinate)
|
||||
{
|
||||
static constexpr double RAD2DEG_D = 180.0 / M_PI;
|
||||
|
||||
double latitude = std::clamp(
|
||||
coordinate.first, -mbgl::util::LATITUDE_MAX, mbgl::util::LATITUDE_MAX);
|
||||
glm::vec2 screen {
|
||||
mbgl::util::LONGITUDE_MAX + coordinate.second,
|
||||
-(mbgl::util::LONGITUDE_MAX -
|
||||
mbgl::util::RAD2DEG_D *
|
||||
RAD2DEG_D *
|
||||
std::log(std::tan(M_PI / 4.0 +
|
||||
latitude * M_PI / mbgl::util::DEGREES_MAX)))};
|
||||
return screen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue