new tile endpoint, fix landcover
This commit is contained in:
@@ -141,7 +141,7 @@ void Map::setup() {
|
||||
sources.emplace("outdoors",
|
||||
std::unique_ptr<Source>(new Source(*this,
|
||||
painter,
|
||||
"http://a.gl-api-us-east-1.tilestream.net/v3/mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v42-dev/%d/%d/%d.gl.pbf",
|
||||
"http://api-maps-gl.tilestream.net/v3/mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v42-dev/%d/%d/%d.gl.pbf",
|
||||
Source::Type::vector,
|
||||
{{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }},
|
||||
512,
|
||||
|
||||
@@ -176,7 +176,7 @@ void Painter::translateLayer(const std::array<float, 2> &translation, const Tile
|
||||
const int direction = reverse ? -1 : 1;
|
||||
// TODO: Get rid of the 8 (scaling from 4096 to tile size)
|
||||
const double factor = direction * ((double)(1 << id.z)) / map.getState().getScale() /
|
||||
map.getState().getPixelRatio() * (4096.0 / util::tileSize);
|
||||
1 * (4096.0 / util::tileSize);
|
||||
matrix::translate(matrix, matrix, translation[0] * factor, translation[1] * factor, 0);
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ mat4 Painter::translatedMatrix(const std::array<float, 2> &translation, const Ti
|
||||
} else {
|
||||
// TODO: Get rid of the 8 (scaling from 4096 to tile size)
|
||||
const double factor = ((double)(1 << id.z)) / map.getState().getScale() /
|
||||
map.getState().getPixelRatio() * (4096.0 / util::tileSize);
|
||||
1 * (4096.0 / util::tileSize);
|
||||
|
||||
mat4 result;
|
||||
if (anchor == TranslateAnchor::Viewport) {
|
||||
|
||||
Reference in New Issue
Block a user