Skip to content

Commit

Permalink
Fix autozoom camera
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Nov 24, 2021
1 parent 3ca16f1 commit baebe57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tileserver/application/templates/cesiumViewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
var a = Cesium.Cartesian3.fromDegrees(extents.xmin, extents.ymin, 0)
var b = Cesium.Cartesian3.fromDegrees(extents.xmax, extents.ymax, 0)
var length = Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2)
if (length <= 100000) {
if (length <= 5000) {
// Zoom out to whole globe
length = 20000000;
}
Expand Down

0 comments on commit baebe57

Please sign in to comment.