Changeset 33925 in osm for applications
- Timestamp:
- 2017-11-28T00:51:00+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java
r33793 r33925 53 53 import org.openstreetmap.josm.data.coor.LatLon; 54 54 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 55 import org.openstreetmap.josm.gui.MainApplication; 55 56 import org.openstreetmap.josm.gui.MapView; 56 57 import org.openstreetmap.josm.gui.layer.Layer; 57 58 import org.openstreetmap.josm.plugins.osminspector.gui.OsmInspectorDialog; 58 59 import org.openstreetmap.josm.tools.ImageProvider; 60 import org.openstreetmap.josm.tools.Logging; 59 61 60 62 import com.vividsolutions.jts.geom.Envelope; … … 62 64 import com.vividsolutions.jts.io.ParseException; 63 65 64 @SuppressWarnings({ "deprecation"})65 66 public class OsmInspectorLayer extends Layer { 66 67 … … 366 367 setGeometry(selectGeomType, typeName); 367 368 368 Main.info("Osm Inspector Features size: " + features.size());369 Logging.info("Osm Inspector Features size: " + features.size()); 369 370 Style style = createDefaultStyle(idx, selectedFeatures); 370 371 … … 410 411 selectGeomType.add(GeomType.POINT); 411 412 412 ProgressMonitor monitor = new ProgressMonitor(Main .map.mapView,413 ProgressMonitor monitor = new ProgressMonitor(MainApplication.getMap().mapView, 413 414 "Loading features", "", 0, 100); 414 415 … … 422 423 setGeometry(selectGeomType, typeName); 423 424 424 Main.info("Osm Inspector Features size: " + features.size());425 Logging.info("Osm Inspector Features size: " + features.size()); 425 426 426 427 OSMIFeatureTracker tracker = arrFeatures.get(idx - layerOffset); … … 512 513 513 514 private void setGeometry(ArrayList<GeomType> selectedTypes, String typename) { 514 Main.info("Passed type is" + typename);515 Logging.info("Passed type is" + typename); 515 516 if (typename.compareTo("duplicate_ways") == 0) { 516 517 geometryType = GeomType.LINE; … … 577 578 public void updateView() { 578 579 this.dialog.revalidate(); 579 Main.map.mapView.revalidate(); 580 Main.map.repaint(); 580 invalidate(); 581 581 } 582 582 583 583 public void selectFeatures(int x, int y) { 584 584 int pixelDelta = 2; 585 LatLon clickUL = Main .map.mapView.getLatLon(x - pixelDelta, y585 LatLon clickUL = MainApplication.getMap().mapView.getLatLon(x - pixelDelta, y 586 586 - pixelDelta); 587 LatLon clickLR = Main .map.mapView.getLatLon(x + pixelDelta, y587 LatLon clickLR = MainApplication.getMap().mapView.getLatLon(x + pixelDelta, y 588 588 + pixelDelta); 589 589 … … 618 618 try (FeatureIterator<SimpleFeature> iter = selectedFeatures.features()) { 619 619 620 Main.info("Selected features " + selectedFeatures.size());620 Logging.info("Selected features " + selectedFeatures.size()); 621 621 622 622 while (iter.hasNext()) { … … 630 630 content.addLayer(new FeatureLayer(features, style)); 631 631 } catch (IOException e) { 632 Main.error(e);632 Logging.error(e); 633 633 } 634 634 } … … 638 638 639 639 public void selectFeatures(LatLon center) { 640 Point point = Main .map.mapView.getPoint(center);640 Point point = MainApplication.getMap().mapView.getPoint(center); 641 641 selectFeatures(point.x, point.y); 642 642 }
Note:
See TracChangeset
for help on using the changeset viewer.