예제 #1
0
 /** Sets start and target coordinates */
 private void extractCoordinates(int edgeV) {
   int startNode = view.getStartNode(edgeV);
   int targetNode = view.getTargetNode(edgeV);
   this.edge = view.translate(edgeV);
   Coordinates coordsTargetNode = graph.getCoordinates(targetNode);
   Coordinates coordsStartNode = graph.getCoordinates(startNode);
   xstart = (int) ((coordsStartNode.getSmtX(zoom) - x) * 256);
   ystart = (int) ((coordsStartNode.getSmtY(zoom) - y) * 256);
   xtarget = (int) ((coordsTargetNode.getSmtX(zoom) - x) * 256);
   ytarget = (int) ((coordsTargetNode.getSmtY(zoom) - y) * 256);
   p = graph.getEdgeProperties(edge);
 }
예제 #2
0
 private Set<Integer> getEdgesOnTile(final int x, final int y, final int zoom, GraphIndex index) {
   final Coordinates leftTop = Coordinates.fromSmt(x - 0.1f, y + 1.1f, zoom);
   final Coordinates rightBottom = Coordinates.fromSmt(x + 1.1f, y - 0.1f, zoom);
   final Set<Integer> edges = index.getEdgesInRectangle(leftTop, rightBottom);
   return edges;
 }