Changeset 13260 in osm for applications/editors/josm


Ignore:
Timestamp:
2009-01-19T16:22:15+01:00 (16 years ago)
Author:
stoecker
Message:

close #2020. patch by Detlef Reichl

Location:
applications/editors/josm/plugins/slippy_map_chooser/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java

    r12778 r13260  
    2929import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
    3030import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
     31import org.openstreetmap.josm.Main;
    3132import org.openstreetmap.josm.gui.download.DownloadDialog;
    3233import org.openstreetmap.josm.gui.download.DownloadSelection;
     
    7475        setMaxTilesInmemory(SlippyMapChooserPlugin.MAX_TILES_IN_MEMORY);
    7576        addComponentListener(this);
     77
     78        String mapStyle = Main.pref.get("slippy_map_chooser.mapstyle", "mapnik");
     79        if(mapStyle.equals("osmarender")) {
     80            iSourceButton.setIsMapStyleMapnik(false);
     81            this.setTileSource(sources[1]);
     82        }
     83        else {
     84            if(!mapStyle.equals("mapnik"))
     85                Main.pref.put("slippy_map_chooser.mapstyle", "mapnik");
     86        }
    7687    }
    7788
     
    249260        if (mapSource == SourceButton.MAPNIK) {
    250261            this.setTileSource(sources[0]);
     262            Main.pref.put("slippy_map_chooser.mapstyle", "mapnik");
    251263        } else {
    252264            this.setTileSource(sources[1]);
     265            Main.pref.put("slippy_map_chooser.mapstyle", "osmarender");
    253266        }
    254267    }
  • applications/editors/josm/plugins/slippy_map_chooser/src/SourceButton.java

    r12778 r13260  
    8686        return 0;
    8787    }
     88   
     89    public void setIsMapStyleMapnik (boolean style) {
     90        isMapnik = style;
     91    }
    8892}
Note: See TracChangeset for help on using the changeset viewer.