Fix geocoder

This commit is contained in:
Tom MacWright
2012-11-26 16:05:40 -05:00
parent 157eb42422
commit 1e778174c8
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -60,9 +60,9 @@ var iD = function(container) {
encodeURIComponent(val) + '.jsonp?callback=grid';
});
function grid(resp) {
map.setCentre(resp.results[0][0]);
}
window.grid = function(resp) {
map.setCenter([resp.results[0][0].lon, resp.results[0][0].lat]);
};
bar.append('div')
.attr('class', 'messages');
+1 -1
View File
@@ -395,7 +395,7 @@ iD.Map = function(elem, connection) {
var a = d3.event.translate,
b = translateStart;
surface.style(transformProp,
'translate3d(' + (a[0] - b[0]) + 'px,' + (a[1] - b[1]) + 'px, 0px)');
'translate3d(' + ~~(a[0] - b[0]) + 'px,' + ~~(a[1] - b[1]) + 'px, 0px)');
} else {
redraw();
translateStart = null;