Changeset 15739 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2020-01-20T21:59:53+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r15306 r15739 12 12 import java.net.MalformedURLException; 13 13 import java.nio.file.InvalidPathException; 14 import java.time.Year; 15 import java.time.ZoneOffset; 14 16 import java.util.Collection; 15 17 import java.util.Collections; … … 95 97 private static ImageryInfo convertImagery(ImageryInfo info) { 96 98 try { 99 if (info.getUrl().contains("{time}")) { 100 final String instant = Year.now().atDay(1).atStartOfDay(ZoneOffset.UTC).toInstant().toString(); 101 final String example = String.join("/", instant, instant); 102 final String initialSelectionValue = info.getDate() != null ? info.getDate() : example; 103 final String userDate = JOptionPane.showInputDialog(MainApplication.getMainFrame(), 104 tr("Time filter for \"{0}\" such as \"{1}\"", info.getName(), example), 105 initialSelectionValue); 106 if (userDate == null) { 107 return null; 108 } 109 info.setDate(userDate); 110 // TODO persist new {time} value (via ImageryLayerInfo.save?) 111 } 97 112 switch(info.getImageryType()) { 98 113 case WMS_ENDPOINT:
Note:
See TracChangeset
for help on using the changeset viewer.