Changeset 16290 in osm for applications/editors/josm/plugins/openstreetbugs/src
- Timestamp:
- 2009-07-03T12:34:14+02:00 (15 years ago)
- 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 37 37 import org.openstreetmap.josm.data.osm.DataSet; 38 38 import org.openstreetmap.josm.data.osm.Node; 39 import org.openstreetmap.josm.tools.OsmUrlToBounds; 39 40 import org.openstreetmap.josm.plugins.osb.ConfigKeys; 40 41 import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils; … … 48 49 String uri = Main.pref.get(ConfigKeys.OSB_API_URI_DOWNLOAD); 49 50 51 int zoom = OsmUrlToBounds.getZoom(Main.map.mapView.getRealBounds()); 50 52 // check zoom level 51 if( Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom()< 9) {53 if(zoom > 15 || zoom < 9) { 52 54 return; 53 55 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java
r16163 r16290 75 75 import org.openstreetmap.josm.plugins.osb.gui.action.OsbActionObserver; 76 76 import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory; 77 import org.openstreetmap.josm.tools.OsmUrlToBounds; 77 78 import org.openstreetmap.josm.tools.Shortcut; 78 79 … … 118 119 119 120 public void actionPerformed(ActionEvent e) { 121 int zoom = OsmUrlToBounds.getZoom(Main.map.mapView.getRealBounds()); 120 122 // check zoom level 121 if ( Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom()< 9) {123 if (zoom > 15 || zoom < 9) { 122 124 JOptionPane.showMessageDialog(Main.parent, 123 125 tr("The visible area is either too small or too big to download data from OpenStreetBugs"), … … 257 259 258 260 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()); 261 262 } 262 263
Note:
See TracChangeset
for help on using the changeset viewer.