change line width and add line-width test

This commit is contained in:
Konstantin Käfer
2014-07-10 14:54:43 -07:00
parent a8963fcbe4
commit a8e71bcb7b
12 changed files with 73 additions and 21 deletions

View File

@@ -92,7 +92,7 @@ float TransformState::getPixelRatio() const {
#pragma mark - Zoom
float TransformState::getNormalizedZoom() const {
return std::log(scale * util::tileSize / 256.0f) / M_LN2;
return std::log(scale * util::tileSize / 512.0f) / M_LN2;
}
int32_t TransformState::getIntegerZoom() const {

View File

@@ -250,11 +250,6 @@ void StyleLayer::updateProperties(float z, const timestamp now) {
layers->updateProperties(z, now);
}
// Accomodate for different tile size.
if (bucket && bucket->source) {
z += std::log(bucket->source->tile_size / 256.0f) / M_LN2;
}
cleanupAppliedStyleProperties(now);
switch (type) {

View File

@@ -170,7 +170,9 @@ void StyleParser::parseSources(JSVal value) {
parseRenderProperty(itr->value, type, "type", parseSourceType);
parseRenderProperty(itr->value, url, "url");
parseRenderProperty(itr->value, tile_size, "tileSize");
if (type == SourceType::Raster) {
parseRenderProperty(itr->value, tile_size, "tileSize");
}
parseRenderProperty(itr->value, min_zoom, "minZoom");
parseRenderProperty(itr->value, max_zoom, "maxZoom");