mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-07 20:01:33 +00:00
Pass dimensions to d3.geo.tile
This commit is contained in:
@@ -234,12 +234,13 @@ iD.Connection = function() {
|
||||
bboxFromAPI(e.box, e.tile, done);
|
||||
}
|
||||
|
||||
function loadTiles(projection) {
|
||||
var scaleExtent = [15, 15],
|
||||
function loadTiles(projection, dimensions) {
|
||||
var scaleExtent = [16, 16],
|
||||
s = projection.scale(),
|
||||
tiles = d3.geo.tile()
|
||||
.scaleExtent(scaleExtent)
|
||||
.scale(s)
|
||||
.size(dimensions)
|
||||
.translate(projection.translate())(),
|
||||
z = Math.max(Math.log(s) / Math.log(2) - 8, 0),
|
||||
rz = Math.max(scaleExtent[0], Math.min(scaleExtent[1], Math.floor(z))),
|
||||
|
||||
@@ -164,7 +164,7 @@ iD.Map = function() {
|
||||
surface.attr('data-zoom', ~~map.zoom());
|
||||
tilegroup.call(background);
|
||||
if (map.editable()) {
|
||||
connection.loadTiles(projection);
|
||||
connection.loadTiles(projection, dimensions);
|
||||
drawVector(difference);
|
||||
} else {
|
||||
editOff();
|
||||
|
||||
Reference in New Issue
Block a user