diff -urb --exclude='*.svn*' josm-dev/plugins/slippy_map_chooser/src/SlippyMapChooser.java josm-smc/plugins/slippy_map_chooser/src/SlippyMapChooser.java
|
old
|
new
|
|
| 28 | 28 | import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; |
| 29 | 29 | import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; |
| 30 | 30 | import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; |
| | 31 | import org.openstreetmap.josm.Main; |
| 31 | 32 | import org.openstreetmap.josm.gui.download.DownloadDialog; |
| 32 | 33 | import org.openstreetmap.josm.gui.download.DownloadSelection; |
| 33 | 34 | |
| … |
… |
|
| 73 | 74 | setFileCacheEnabled(SlippyMapChooserPlugin.ENABLE_FILE_CACHE); |
| 74 | 75 | setMaxTilesInmemory(SlippyMapChooserPlugin.MAX_TILES_IN_MEMORY); |
| 75 | 76 | addComponentListener(this); |
| | 77 | |
| | 78 | String mapStyle = Main.pref.get("slippy_map_chooser.mapstyle", "mapnik"); |
| | 79 | if(mapStyle == "osmarender") { |
| | 80 | iSourceButton.setIsMapStyleMapnik(false); |
| | 81 | this.setTileSource(sources[1]); |
| | 82 | } |
| | 83 | else { |
| | 84 | if(mapStyle != "mapnik") |
| | 85 | Main.pref.put("slippy_map_chooser.mapstyle", "mapnik"); |
| | 86 | } |
| 76 | 87 | } |
| 77 | 88 | |
| 78 | 89 | public void setMaxTilesInmemory(int tiles) { |
| … |
… |
|
| 248 | 259 | this.tileCache = new MemoryTileCache(); |
| 249 | 260 | if (mapSource == SourceButton.MAPNIK) { |
| 250 | 261 | this.setTileSource(sources[0]); |
| | 262 | Main.pref.put("slippy_map_chooser.mapstyle", "mapnik"); |
| 251 | 263 | } else { |
| 252 | 264 | this.setTileSource(sources[1]); |
| | 265 | Main.pref.put("slippy_map_chooser.mapstyle", "osmarender"); |
| 253 | 266 | } |
| 254 | 267 | } |
| 255 | 268 | |
diff -urb --exclude='*.svn*' josm-dev/plugins/slippy_map_chooser/src/SourceButton.java josm-smc/plugins/slippy_map_chooser/src/SourceButton.java
|
old
|
new
|
|
| 85 | 85 | |
| 86 | 86 | return 0; |
| 87 | 87 | } |
| | 88 | |
| | 89 | public void setIsMapStyleMapnik (boolean style) { |
| | 90 | isMapnik = style; |
| | 91 | } |
| 88 | 92 | } |