@Test public void getWorldPos() { AffineTransform tr = pane.getMapContent().getViewport().getScreenToWorld(); Point2D p = new Point2D.Double(x, y); tr.transform(p, p); MapMouseEvent ev = createEvent(x, y); DirectPosition2D pos = ev.getWorldPos(); assertEquals(p.getX(), pos.x, TOL); assertEquals(p.getY(), pos.y, TOL); }
public DirectPosition2D getWorldPos() { return new DirectPosition2D( worldCoords.getCoordinateReferenceSystem(), worldCoords.x, worldCoords.y); }
MapMouseEvent extends MouseEvent { public DirectPosition2D getWorldPos() { return new DirectPosition2D( worldCoords.getCoordinateReferenceSystem(), worldCoords.x, worldCoords.y); } }
MapMouseEvent extends MouseEvent { public DirectPosition2D getWorldPos() { return new DirectPosition2D( worldCoords.getCoordinateReferenceSystem(), worldCoords.x, worldCoords.y); } MapMouseEvent(MapPane pane, MouseEvent event);  MapMouseEvent(MapPane pane, MouseWheelEvent event); }
MapMouseEvent extends MouseEvent { public DirectPosition2D getWorldPos() { return new DirectPosition2D( worldCoords.getCoordinateReferenceSystem(), worldCoords.x, worldCoords.y); } MapMouseEvent(MapPane pane, MouseEvent event);  MapMouseEvent(MapPane pane, MouseWheelEvent event); @Override MapPane getSource(); boolean isWheelEvent(); int getWheelAmount(); DirectPosition2D getMapPosition(); DirectPosition2D getWorldPos(); ReferencedEnvelope getEnvelopeByWorld(double widthWorld); ReferencedEnvelope getEnvelopeByPixels(double widthPixels); }
MapMouseEvent extends MouseEvent { public DirectPosition2D getWorldPos() { return new DirectPosition2D( worldCoords.getCoordinateReferenceSystem(), worldCoords.x, worldCoords.y); } MapMouseEvent(MapPane pane, MouseEvent event);  MapMouseEvent(MapPane pane, MouseWheelEvent event); @Override MapPane getSource(); boolean isWheelEvent(); int getWheelAmount(); DirectPosition2D getMapPosition(); DirectPosition2D getWorldPos(); ReferencedEnvelope getEnvelopeByWorld(double widthWorld); ReferencedEnvelope getEnvelopeByPixels(double widthPixels);  }