public Coordinate transform ( Coordinate coordinate , String from , String to ) { if ( from . equalsIgnoreCase ( to ) ) { return coordinate ; } org . geomajas . geometry . Coordinate transformed ; if ( SCREEN . equalsIgnoreCase ( from ) && WORLD . equalsIgnoreCase ( to ) ) { transformed = mapView . getWorldViewTransformer ( ) . viewToWorld ( coordinate ) ; return new Coordinate ( transformed . getX ( ) , transformed . getY ( ) ) ; } else if ( WORLD . equalsIgnoreCase ( from ) && SCREEN . equalsIgnoreCase ( to ) ) { transformed = mapView . getWorldViewTransformer ( ) . worldToView ( coordinate ) ; return new Coordinate ( transformed . getX ( ) , transformed . getY ( ) ) ; } return coordinate ; }
Transform the given coordinate from a certain rendering space to another .