Package com.bbn.openmap.proj

Examples of com.bbn.openmap.proj.Projection.forward()


                // get corners
                LatLonPoint ul = projection.getUpperLeft();
                LatLonPoint lr = projection.getLowerRight();

                // set start/end indicies
                Point ulp = projection.forward(ul);
                Point lrp = projection.forward(lr);
                sx = (int) ulp.getX();
                ex = (int) lrp.getX();
                sy = (int) ulp.getY();
                ey = (int) lrp.getY();
View Full Code Here


                LatLonPoint ul = projection.getUpperLeft();
                LatLonPoint lr = projection.getLowerRight();

                // set start/end indicies
                Point ulp = projection.forward(ul);
                Point lrp = projection.forward(lr);
                sx = (int) ulp.getX();
                ex = (int) lrp.getX();
                sy = (int) ulp.getY();
                ey = (int) lrp.getY();
View Full Code Here

     */
    public void mouseReleased(MouseEvent arg0) {
        if (isPanning && arg0.getSource() instanceof MapBean) {
            MapBean mb = (MapBean) arg0.getSource();
            Projection proj = mb.getProjection();
            Point center = proj.forward(proj.getCenter());
            center.setLocation(center.getX() - arg0.getX() + oX, center.getY() - arg0.getY() + oY);
            mb.setCenter(proj.inverse(center));
            isPanning = false;
            // bufferedMapImage = null; //clean up when not active...
        }
View Full Code Here

            for (int i = south; i < north; i += stepSize) {
                float lat = (float) i;

                if ((lat % 2) == 0) {
                    if (boxy) {
                        point = projection.forward(lat, west);
                        point.x = 0;
                        llpoint = projection.inverse(point);
                    } else {
                        llpoint = new LatLonPoint(lat, west);
                        while (projection.forward(llpoint).x < 0) {
View Full Code Here

                        point = projection.forward(lat, west);
                        point.x = 0;
                        llpoint = projection.inverse(point);
                    } else {
                        llpoint = new LatLonPoint(lat, west);
                        while (projection.forward(llpoint).x < 0) {
                            llpoint.setLongitude(llpoint.getLongitude()
                                    + stepSize);
                        }
                    }
View Full Code Here

        for (int i = west; i < east; i += stepSize) {
            float lon = (float) i;

            if ((lon % 2) == 0) {
                if (boxy) {
                    point = projection.forward(south, lon);
                    point.y = projection.getHeight();
                    llpoint = projection.inverse(point);
                } else {
                    llpoint = new LatLonPoint(south, lon);
                    while (projection.forward(llpoint).y > projection.getHeight()) {
View Full Code Here

                    point = projection.forward(south, lon);
                    point.y = projection.getHeight();
                    llpoint = projection.inverse(point);
                } else {
                    llpoint = new LatLonPoint(south, lon);
                    while (projection.forward(llpoint).y > projection.getHeight()) {
                        llpoint.setLatitude(llpoint.getLatitude() + stepSize);
                    }
                }

                currentText = new OMText(llpoint.getLatitude(), llpoint.getLongitude(),
View Full Code Here

                                // get corners
                LatLonPoint ul = projection.getUpperLeft();
                LatLonPoint lr = projection.getLowerRight();

                                // set start/end indicies
                Point ulp = projection.forward(ul);
                Point lrp = projection.forward(lr);
                sx = (int) ulp.getX();
                ex = (int) lrp.getX();
                sy = (int) ulp.getY();
                ey = (int) lrp.getY();
View Full Code Here

                LatLonPoint ul = projection.getUpperLeft();
                LatLonPoint lr = projection.getLowerRight();

                                // set start/end indicies
                Point ulp = projection.forward(ul);
                Point lrp = projection.forward(lr);
                sx = (int) ulp.getX();
                ex = (int) lrp.getX();
                sy = (int) ulp.getY();
                ey = (int) lrp.getY();
View Full Code Here

                    && !from.equals(road.getSecondIntersection())) {
                logger.severe("huh? " + from
                        + " is not an intersection on road " + road);
            }

            Point pt = createPoint(proj.forward(from.getLocation()));

            if (doLoopCheck) {
                if (ptSet.contains(pt)) {
                    logger.warning("pt set has duplicate at " + pt);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.