Examples of GpxLayer


Examples of org.openstreetmap.josm.gui.layer.GpxLayer

      @Override
      public void actionPerformed(ActionEvent e) {
        String base_url = nombre.getText() + "_";
        for (Layer layer : capas) {
          if (layer instanceof GpxLayer) {
            GpxLayer gpxLayer = (GpxLayer) layer;
            File f = new File(base_url + gpxLayer.name + ".gpx");

            boolean sobreescribir = !f.exists();

            try {
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

      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

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

        ls.color = Color
            .getHSBColor(f * random.nextFloat(), 0.9f, 0.9f);
        ls.width = LogicConstants.getInt("PLAN_WAY_WIDTH", 2);
        MarkerLayer stops = new MarkerLayer(new GpxData(), "Stops "
            + id_layer, File.createTempFile("stops", "tmp"),
            new GpxLayer(new GpxData()), this.mapView);
        stops.data.add(new StopMarker(latlon_origin, "origin",
            "tsp_stop", stops, 0, 0, ls.color));
        for (String stop : plan.getStops()) {
          String[] array = stop.split(",");
          double[] point = new double[2];
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

    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);
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

  private Layer loadIncidences() {
    MarkerLayer incidences = null;
    try {
      incidences = new MarkerLayer(new GpxData(),
          i18n.getString("Incidences.incidences"),
          File.createTempFile("incidences", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      incidences.visible = Authentication.getUsuario()
          .getIncidenciasVisibles();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

  private Layer loadPersonas() {
    MarkerLayer resources = null;
    try {
      resources = new MarkerLayer(new GpxData(),
          i18n.getString("Resources.resources.people"),
          File.createTempFile("layer_res", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      resources.visible = Authentication.getUsuario()
          .getPersonasVisibles();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

  private Layer loadVehiculos() {
    MarkerLayer resources = null;
    try {
      resources = new MarkerLayer(new GpxData(),
          i18n.getString("Resources.resources.vehicles"),
          File.createTempFile("layer_res", "tmp"), new GpxLayer(
              new GpxData()), this.mapView);
      resources.visible = Authentication.getUsuario()
          .getVehiculosVisibles();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

            try (InputStream in = support.getInputStream(fileStr)) {
                GpxImporter.GpxImporterData importData = GpxImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(), null, progressMonitor);

                support.addPostLayersTask(importData.getPostLayerTask());

                GpxLayer gpxLayer = null;
                List<SessionReader.LayerDependency> deps = support.getLayerDependencies();
                if (!deps.isEmpty()) {
                    Layer layer = deps.iterator().next().getLayer();
                    if (layer instanceof GpxLayer) {
                        gpxLayer = (GpxLayer) layer;
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

                    useThumbs = Boolean.parseBoolean(imgElem.getTextContent());
                }
            }
        }

        GpxLayer gpxLayer = null;
        List<SessionReader.LayerDependency> deps = support.getLayerDependencies();
        if (!deps.isEmpty()) {
            Layer layer = deps.iterator().next().getLayer();
            if (layer instanceof GpxLayer) {
                gpxLayer = (GpxLayer) layer;
View Full Code Here

Examples of org.openstreetmap.josm.gui.layer.GpxLayer

                return;
            String name = newLayerName != null ? newLayerName : tr("Downloaded GPX Data");

            GpxImporterData layers = GpxImporter.loadLayers(rawData, reader.isGpxParsedProperly(), name, tr("Markers from {0}", name));

            GpxLayer gpxLayer = addOrMergeLayer(layers.getGpxLayer(), findGpxMergeLayer());
            addOrMergeLayer(layers.getMarkerLayer(), findMarkerMergeLayer(gpxLayer));

            layers.getPostLayerTask().run();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.