Package org.openstreetmap.josm.data.osm.visitor

Examples of org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor.visit()


        @Override
        protected void computeBboxAndCenterScale(Bounds bounds) {
            BoundingXYVisitor v = new BoundingXYVisitor();
            if (bounds != null) {
                v.visit(bounds);
            } else {
                v.computeBoundingBox(dataSet.getNodes());
            }
            // Main.map.mapView.recalculateCenterScale(v);
        }
View Full Code Here


    Collection<DataSource> dataSources = Main.main.editLayer().data.dataSources;
    // ... with bounding box[es] of data loaded from OSM or a file...
    BoundingXYVisitor bbox = new BoundingXYVisitor();
    for (DataSource ds : dataSources) {
      if (ds.bounds != null) {
        bbox.visit(Main.proj.latlon2eastNorth(ds.bounds.max));
        bbox.visit(Main.proj.latlon2eastNorth(ds.bounds.min));
      }
      if (bbox.max != null && bbox.min != null
          && !bbox.max.equals(bbox.min)) {
        // ... we zoom to it's bounding box
View Full Code Here

    // ... with bounding box[es] of data loaded from OSM or a file...
    BoundingXYVisitor bbox = new BoundingXYVisitor();
    for (DataSource ds : dataSources) {
      if (ds.bounds != null) {
        bbox.visit(Main.proj.latlon2eastNorth(ds.bounds.max));
        bbox.visit(Main.proj.latlon2eastNorth(ds.bounds.min));
      }
      if (bbox.max != null && bbox.min != null
          && !bbox.max.equals(bbox.min)) {
        // ... we zoom to it's bounding box
        recalculateCenterScale(bbox);
View Full Code Here

            break;
        case "download":
            Bounds bounds = DownloadDialog.getSavedDownloadBounds();
            if (bounds != null) {
                try {
                    v.visit(bounds);
                } catch (Exception e) {
                    Main.warn(e);
                }
            }
            break;
View Full Code Here

            // make sure this isn't called unless there *is* a MapView
            GuiHelper.executeByMainWorkerInEDT(new Runnable() {
                @Override
                public void run() {
                    BoundingXYVisitor bbox1 = new BoundingXYVisitor();
                    bbox1.visit(bbox);
                    Main.map.mapView.recalculateCenterScale(bbox1);
                }
            });
        }
    }
View Full Code Here

        }

        protected void computeBboxAndCenterScale() {
            BoundingXYVisitor v = new BoundingXYVisitor();
            if (currentBounds != null) {
                v.visit(currentBounds);
            } else {
                v.computeBoundingBox(dataSet.getNodes());
            }
            Main.map.mapView.recalculateCenterScale(v);
        }
View Full Code Here

            return false;
        Collection<DataSource> dataSources = ds.dataSources;
        // ... with bounding box[es] of data loaded from OSM or a file...
        BoundingXYVisitor bbox = new BoundingXYVisitor();
        for (DataSource source : dataSources) {
            bbox.visit(source.bounds);
        }
        if (bbox.hasExtend()) {
            // ... we zoom to it's bounding box
            recalculateCenterScale(bbox);
            return true;
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.