Skip to content
Snippets Groups Projects
Commit 9d05da6a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

imports organized

parent 67331921
No related branches found
No related tags found
1 merge request!25Basic semantic zooming functionality
......@@ -6,7 +6,6 @@ import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import lcsb.mapviewer.api.BaseController;
......
......@@ -17,8 +17,6 @@ import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestParam;
import lcsb.mapviewer.api.BaseRestImpl;
import lcsb.mapviewer.api.QueryException;
......@@ -266,19 +264,19 @@ public class ProjectRestImpl extends BaseRestImpl {
Double minY = originalModel.getHeight();
Double maxX = 0.0;
Double maxY = 0.0;
Path2D polygon = cc.latLngToPolygon(polygonString);
PathIterator pathIter = polygon.getPathIterator(null);
while (!pathIter.isDone()) {
final double[] segment = new double[PATH_ITERATOR_SEGMENT_SIZE];
if (pathIter.currentSegment(segment) != PathIterator.SEG_CLOSE) {
minX = Math.min(minX, segment[0]);
maxX = Math.max(maxX, segment[0]);
minY = Math.min(minY, segment[1]);
maxY = Math.max(maxY, segment[1]);
}
pathIter.next();
Path2D polygon = cc.latLngToPolygon(polygonString);
PathIterator pathIter = polygon.getPathIterator(null);
while (!pathIter.isDone()) {
final double[] segment = new double[PATH_ITERATOR_SEGMENT_SIZE];
if (pathIter.currentSegment(segment) != PathIterator.SEG_CLOSE) {
minX = Math.min(minX, segment[0]);
maxX = Math.max(maxX, segment[0]);
minY = Math.min(minY, segment[1]);
maxY = Math.max(maxY, segment[1]);
}
pathIter.next();
}
maxX = Math.min(originalModel.getWidth(), maxX);
maxY = Math.min(originalModel.getHeight(), maxY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment