Package org.openstreetmap.josm.data

Examples of org.openstreetmap.josm.data.ViewportData


                        double dist = 0.01 * proj.getDefaultZoomInPPD();
                        LatLon ll1 = proj.eastNorth2latlon(new EastNorth(center.east() - dist, center.north()));
                        LatLon ll2 = proj.eastNorth2latlon(new EastNorth(center.east() + dist, center.north()));
                        double meterPerEasting = ll1.greatCircleDistance(ll2) / dist / 2;
                        double scale = meterPerPixel / meterPerEasting; // unit: easting per pixel
                        viewport = new ViewportData(center, scale);
                    } catch (NumberFormatException ex) {
                        Main.warn(ex);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.ViewportData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.