summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-11 13:54:05 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-05-11 13:54:05 -0700
commit1a030e7c3347f08329d2787cde37cfa0958baad4 (patch)
treee9ec309eda3de6edc411824e76df632730d41064 /src/mbgl/util
parent5f1144f05a8391cf2c01dc7a67312a27ef32805b (diff)
downloadqtlocation-mapboxgl-1a030e7c3347f08329d2787cde37cfa0958baad4.tar.gz
[core] Normalize tile coordinates in VectorTile (#4966)
Previously, vector tile coordinates were being normalized to util::EXTENT in each place they were used, and for annotation and GeoJSON sources that don't require normalization.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/get_geometries.cpp21
-rw-r--r--src/mbgl/util/get_geometries.hpp12
2 files changed, 0 insertions, 33 deletions
diff --git a/src/mbgl/util/get_geometries.cpp b/src/mbgl/util/get_geometries.cpp
deleted file mode 100644
index 5961af2150..0000000000
--- a/src/mbgl/util/get_geometries.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <mbgl/util/get_geometries.hpp>
-#include <mbgl/util/constants.hpp>
-
-#include <cmath>
-
-namespace mbgl {
-
-GeometryCollection getGeometries(const GeometryTileFeature& feature) {
- const float scale = float(util::EXTENT) / feature.getExtent();
- GeometryCollection geometryCollection = feature.getGeometries();
- for (auto& line : geometryCollection) {
- for (auto& point : line) {
- point.x = ::round(point.x * scale);
- point.y = ::round(point.y * scale);
- }
- }
- return geometryCollection;
-}
-
-} // namespace mbgl
-
diff --git a/src/mbgl/util/get_geometries.hpp b/src/mbgl/util/get_geometries.hpp
deleted file mode 100644
index 013a7e5b9f..0000000000
--- a/src/mbgl/util/get_geometries.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef MBGL_UTIL_GET_GEOMETRIES
-#define MBGL_UTIL_GET_GEOMETRIES
-
-#include <mbgl/tile/geometry_tile.hpp>
-
-namespace mbgl {
-
-GeometryCollection getGeometries(const GeometryTileFeature& feature);
-
-} // namespace mbgl
-
-#endif