Merge branch 'master' into symbols
Conflicts: src/renderer/painter_text.cpp
This commit is contained in:
@@ -98,8 +98,8 @@ void Transform::setLonLat(const double lon, const double lat, const timestamp du
|
||||
uv::writelock lock(mtx);
|
||||
|
||||
const double f = std::fmin(std::fmax(std::sin(D2R * lat), -0.9999), 0.9999);
|
||||
double xn = -std::round(lon * Bc);
|
||||
double yn = std::round(0.5 * Cc * std::log((1 + f) / (1 - f)));
|
||||
double xn = -lon * Bc;
|
||||
double yn = 0.5 * Cc * std::log((1 + f) / (1 - f));
|
||||
|
||||
_setScaleXY(current.scale, xn, yn, duration);
|
||||
}
|
||||
@@ -111,13 +111,12 @@ void Transform::setLonLatZoom(const double lon, const double lat, const double z
|
||||
double new_scale = std::pow(2.0, zoom);
|
||||
|
||||
const double s = new_scale * util::tileSize;
|
||||
zc = s / 2;
|
||||
Bc = s / 360;
|
||||
Cc = s / (2 * M_PI);
|
||||
|
||||
const double f = std::fmin(std::fmax(std::sin(D2R * lat), -0.9999), 0.9999);
|
||||
double xn = -std::round(lon * Bc);
|
||||
double yn = std::round(0.5 * Cc * log((1 + f) / (1 - f)));
|
||||
double xn = -lon * Bc;
|
||||
double yn = 0.5 * Cc * log((1 + f) / (1 - f));
|
||||
|
||||
_setScaleXY(new_scale, xn, yn, duration);
|
||||
}
|
||||
@@ -309,7 +308,6 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl
|
||||
}
|
||||
|
||||
const double s = final.scale * util::tileSize;
|
||||
zc = s / 2;
|
||||
Bc = s / 360;
|
||||
Cc = s / (2 * M_PI);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user