Ignore:
Timestamp:
2009-07-03T12:34:14+02:00 (15 years ago)
Author:
stoecker
Message:

adapted plugins to JOSm 1722, UtilsPlugin still has a problem

Location:
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java

    r16134 r16290  
    3737import org.openstreetmap.josm.data.osm.DataSet;
    3838import org.openstreetmap.josm.data.osm.Node;
     39import org.openstreetmap.josm.tools.OsmUrlToBounds;
    3940import org.openstreetmap.josm.plugins.osb.ConfigKeys;
    4041import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils;
     
    4849        String uri = Main.pref.get(ConfigKeys.OSB_API_URI_DOWNLOAD);
    4950
     51        int zoom = OsmUrlToBounds.getZoom(Main.map.mapView.getRealBounds());
    5052        // check zoom level
    51         if(Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom() < 9) {
     53        if(zoom > 15 || zoom < 9) {
    5254            return;
    5355        }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java

    r16163 r16290  
    7575import org.openstreetmap.josm.plugins.osb.gui.action.OsbActionObserver;
    7676import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory;
     77import org.openstreetmap.josm.tools.OsmUrlToBounds;
    7778import org.openstreetmap.josm.tools.Shortcut;
    7879
     
    118119
    119120            public void actionPerformed(ActionEvent e) {
     121                int zoom = OsmUrlToBounds.getZoom(Main.map.mapView.getRealBounds());
    120122                // check zoom level
    121                 if (Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom() < 9) {
     123                if (zoom > 15 || zoom < 9) {
    122124                    JOptionPane.showMessageDialog(Main.parent,
    123125                            tr("The visible area is either too small or too big to download data from OpenStreetBugs"),
     
    257259
    258260    public void zoomToNode(Node node) {
    259         double scale = Main.map.mapView.getScale();
    260         Main.map.mapView.zoomTo(node.getEastNorth(), scale);
     261        Main.map.mapView.zoomTo(node.getEastNorth());
    261262    }
    262263
Note: See TracChangeset for help on using the changeset viewer.