Package org.openstreetmap.josm.io

Examples of org.openstreetmap.josm.io.GpxImporter$GpxImporterData


    });
    return cargar;
  }

  private void cargarGpx(File file) throws IOException {
    GpxImporter importer = new GpxImporter();
    if (!importer.acceptFile(file)) {
      new IOException("Gpx inaccesible.");
    }
    final String absolutePath = file.getAbsolutePath();

    for (Layer l : capasActuales) {
      if (l.name.equals(file.getAbsolutePath()))
        return;
    }

    importer.importData(file);
    GpxLayer layer = new MyGpxLayer(importer.getLastData(), absolutePath,
        this.mapView);

    Main.pref.putColor("layer " + layer.name,
        Color.decode(LogicConstants.getNextColor()));
    addCapa(layer);
View Full Code Here


    }
    return file;
  }

  private GpxLayer cargarGpx(File file, String name) {
    GpxImporter importer = new GpxImporter();
    GpxLayer layer = null;
    try {
      if (!importer.acceptFile(file)) {
        new IOException("Gpx inaccesible.");
      }
      importer.importData(file);
      layer = new MyGpxLayer(importer.getLastData(),
          file.getAbsolutePath(), true, this.mapView);
      layer.name = name;
      addCapa(layer);
    } catch (Throwable t) {
      log.error("Error al cargar la capa", t);
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.io.GpxImporter$GpxImporterData

Copyright © 2018 www.massapicom. 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.