Try to fix basemap generation
This commit is contained in:
parent
99b667c92b
commit
d9a7c973b3
1 changed files with 6 additions and 4 deletions
|
@ -156,11 +156,13 @@ public class MapUtils {
|
|||
*/
|
||||
|
||||
public static double getTileNumberX(float zoom, double longitude){
|
||||
if(longitude == 180d) {
|
||||
return getPowZoom(zoom) - 1;
|
||||
}
|
||||
longitude = checkLongitude(longitude);
|
||||
return (longitude + 180d)/360d * getPowZoom(zoom);
|
||||
final double powZoom = getPowZoom(zoom);
|
||||
double dz = (longitude + 180d)/360d * powZoom;
|
||||
if (dz >= powZoom) {
|
||||
return powZoom - 0.01;
|
||||
}
|
||||
return dz;
|
||||
}
|
||||
|
||||
public static double getTileNumberY(float zoom, double latitude){
|
||||
|
|
Loading…
Reference in a new issue