Commit 9562e146 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed ArrayIndexOutOfBoundsException for zoom

parent 5c835cca
......@@ -175,7 +175,7 @@ public class MappingServiceImpl implements MappingService {
// final int pixelSize = (int) Math.round(1.0 + (1 << (zoom / 2))) / 2;
final int[] pixelSizes = new int[] { 0, 0, 0, 1, 1, 2, 2, 2, 3, 2, 2, 3 };
final int pixelSize = pixelSizes[(zoom > pixelSizes.length ? pixelSizes.length : zoom)];
final int pixelSize = pixelSizes[(zoom >= pixelSizes.length ? pixelSizes.length - 1 : zoom)];
if (LOG.isDebugEnabled()) {
LOG.debug(jsonTree.toString());
LOG.debug("PIXELSIZE=" + pixelSize + " zoom=" + zoom);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment