From 851efdf01f9a405dcb0eab72af86a052b83e3f7a Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 4 Dec 2012 16:46:03 -0500 Subject: [PATCH] Cleanup, fix geocoding --- js/id/id.js | 2 +- js/id/renderer/map.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/js/id/id.js b/js/id/id.js index 328ba85cb..2e6840440 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -60,7 +60,7 @@ window.iD = function(container) { }); window.grid = function(resp) { - map.setCenter([resp.results[0][0].lon, resp.results[0][0].lat]); + map.center([resp.results[0][0].lon, resp.results[0][0].lat]); }; bar.append('div') diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 3073ddb9d..4df833bb8 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -75,11 +75,6 @@ iD.Map = function() { redraw(); } }), - nodeline = function(d) { - return 'M' + d.nodes.map(ll2a).map(projection).map(iD.util.geo.roundCoords).join('L'); - }, - getline = function(d) { return d._line; }, - key = function(d) { return d.id; }, background = iD.Background() .projection(projection) .scaleExtent([0, 20]), @@ -142,6 +137,11 @@ iD.Map = function() { function ll2a(o) { return [o.lon, o.lat]; } function pxCenter() { return [dimensions[0] / 2, dimensions[0] / 2]; } function classActive(d) { return d.id === selection; } + function getline(d) { return d._line; } + function key(d) { return d.id; } + function nodeline(d) { + return 'M' + d.nodes.map(ll2a).map(projection).map(iD.util.geo.roundCoords).join('L'); + } function hideInspector() { d3.select('.inspector-wrap').style('display', 'none'); @@ -425,7 +425,6 @@ iD.Map = function() { return [l[0] * scale + translate[0], l[1] * scale + translate[1]]; } - map.dblclickEnable = function(_) { if (!arguments.length) return dblclickEnabled; dblclickEnabled = _;