0

fix incorrect world coord <-> latlng conversion for orientations other than upper-left

This commit is contained in:
Kevin Chang
2012-07-29 15:14:22 -07:00
parent 39f96909e9
commit 884860ebe0

View File

@@ -281,15 +281,15 @@ overviewer.util = {
if (north_direction == overviewerConfig.CONST.UPPERRIGHT){ if (north_direction == overviewerConfig.CONST.UPPERRIGHT){
temp = x; temp = x;
x = -z+16; x = -z+15;
z = temp; z = temp;
} else if(north_direction == overviewerConfig.CONST.LOWERRIGHT){ } else if(north_direction == overviewerConfig.CONST.LOWERRIGHT){
x = -x+16; x = -x+15;
z = -z+16; z = -z+15;
} else if(north_direction == overviewerConfig.CONST.LOWERLEFT){ } else if(north_direction == overviewerConfig.CONST.LOWERLEFT){
temp = x; temp = x;
x = z; x = z;
z = -temp+16; z = -temp+15;
} }
// This information about where the center column is may change with // This information about where the center column is may change with
@@ -370,15 +370,15 @@ overviewer.util = {
if(north_direction == overviewerConfig.CONST.UPPERRIGHT){ if(north_direction == overviewerConfig.CONST.UPPERRIGHT){
temp = point.z; temp = point.z;
point.z = -point.x+16; point.z = -point.x+15;
point.x = temp; point.x = temp;
} else if(north_direction == overviewerConfig.CONST.LOWERRIGHT){ } else if(north_direction == overviewerConfig.CONST.LOWERRIGHT){
point.x = -point.x+16; point.x = -point.x+15;
point.z = -point.z+16; point.z = -point.z+15;
} else if(north_direction == overviewerConfig.CONST.LOWERLEFT){ } else if(north_direction == overviewerConfig.CONST.LOWERLEFT){
temp = point.z; temp = point.z;
point.z = point.x; point.z = point.x;
point.x = -temp+16; point.x = -temp+15;
} }
return point; return point;