Changeset 34435 in osm for applications/editors


Ignore:
Timestamp:
2018-07-27T11:54:47+02:00 (6 years ago)
Author:
nzara
Message:

Bug fix: get from Coordinate

Location:
applications/editors/josm/plugins/pdfimport
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pdfimport/README

    r34095 r34435  
    1010Layout
    1111======
    12 +--- src                                source of your plugin
    13   |- images                             images your plugin needs
    14   |- resources                          resources your plugin needs
     12+- src                                source of the plugin
     13+- images                             images the plugin needs
     14+- resources                          resources the plugin needs
     15+- libs                                                           libraries the plugin needs (pdfbox ...)
    1516
    1617  README                                this file
    1718
    18   GPL-v2.0.txt                          GPL version 2 license text
    19   GPL-v3.0.txt                          GPL version 3 license text
     19  license                               GPL version 3 license text
    2020  build.xml                             deployment build file
    2121
     
    6767 by automatic processes.
    6868
     69Hints for eclipse
     70=================
     71. Building:
     72  . add pdfimport/src to your buildpath
     73  . add to buildpath|libraries: josm-custom.jar, fontbox-...jar, jempbox...jar, pdfbox...jar
     74  . build with ant, if any resources have changed (at least after svn update); eclipse cant handle build of resources, etc
     75. Run / Debug
     76  . main class: org.openstreetmap.josm.gui.MainApplication (found in josm-custom.jar)
     77
    6978See also
    7079========
  • applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java

    r34425 r34435  
    281281
    282282        private PathOptimizer pdfData;
    283         private OsmDataLayer dataLayer;
     283//      private OsmDataLayer dataLayer;
    284284
    285285        private final JButton loadFileButton = new JButton(tr("Load preview ..."));
     
    713713                 */
    714714                removeLayer();
    715                 dataLayer = _layer;
    716                 MainApplication.getLayerManager().addLayer(dataLayer);
     715                Preview.set(_layer, placement);
     716//              dataLayer = _layer;
     717//              MainApplication.getLayerManager().addLayer(dataLayer);
    717718                MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
    718719        }
     
    722723                 * remove preview layer
    723724                 */
    724                 if (dataLayer != null) {
    725                         MainApplication.getLayerManager().removeLayer(dataLayer);
    726                         dataLayer.data.clear(); // saves memory
    727                         dataLayer = null;
    728                 }
     725//              if (dataLayer != null) {
     726//                      MainApplication.getLayerManager().removeLayer(dataLayer);
     727//                      dataLayer.data.clear(); // saves memory
     728//                      dataLayer = null;
     729//              }
     730                Preview.clear();
    729731                // No layer ==> no actions
    730732                actionPanel.showButton.setEnabled(false);
  • applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java

    r34398 r34435  
    2626    }
    2727
    28     public static Projection getProjectionByCode(String code) {
    29                 return new SingleProjectionChoice(code.toString(), code.toString(), code).getProjection() ;
     28        public static Projection getProjectionByCode(String code) {
     29                try {
     30                        ProjectionChoice pc = new SingleProjectionChoice(code.toString(), code.toString(), code);
     31                        Projection p = pc.getProjection();
     32                        return p;
     33                } catch (Exception e) {
     34                        throw new IllegalArgumentException();
     35                }
    3036
    3137//        Projection p = allCodes.get(code);
Note: See TracChangeset for help on using the changeset viewer.