projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2f2dc1
)
Limit Osmarender zoom to 17 levels.
author
Tom Hughes
<tom@compton.nu>
Sun, 31 May 2009 11:25:09 +0000
(11:25 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sun, 31 May 2009 11:25:09 +0000
(11:25 +0000)
app/views/export/start.rjs
patch
|
blob
|
history
diff --git
a/app/views/export/start.rjs
b/app/views/export/start.rjs
index 47cf9ce6bf21feddbcec4cc630233677fd30205c..83db38002444d179027a582a7012f0dc12fc8176 100644
(file)
--- a/
app/views/export/start.rjs
+++ b/
app/views/export/start.rjs
@@
-327,7
+327,7
@@
page << <<EOJ
var ymax = bounds.top * Math.PI / 180;
var yzoom = Math.LOG2E * (Math.log(2000 * 2 * Math.PI) - Math.log(Math.log((Math.tan(ymax) + 1 / Math.cos(ymax)) / (Math.tan(ymin) + 1 / Math.cos(ymin)))))
- return Math.
floor(Math.min(xzoom, yzoom)
);
+ return Math.
min(Math.floor(Math.min(xzoom, yzoom)), 17
);
}
function roundScale(scale) {