kopia lustrzana https://github.com/JOSM/MapWithAI
Porównaj commity
3 Commity
ad6ec16acd
...
fbd3f10541
Autor | SHA1 | Data |
---|---|---|
Taylor Smock | fbd3f10541 | |
Taylor Smock | faa031e49c | |
Taylor Smock | ca0b8e479f |
|
@ -10,8 +10,6 @@ on:
|
|||
branches:
|
||||
- master
|
||||
- $default-branch
|
||||
schedule:
|
||||
- cron: "1 5 * * 6"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -19,7 +17,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
josm-revision: ["", "r18877"]
|
||||
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v1
|
||||
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
|
||||
with:
|
||||
java-version: 17
|
||||
josm-revision: ${{ matrix.josm-revision }}
|
||||
|
|
|
@ -10,4 +10,4 @@ permissions:
|
|||
|
||||
jobs:
|
||||
call-workflow:
|
||||
uses: JOSM/JOSMPluginAction/.github/workflows/reports.yaml@v1
|
||||
uses: JOSM/JOSMPluginAction/.github/workflows/reports.yaml@v2
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.Comparator;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
@ -130,14 +131,20 @@ public class BoundingBoxMapWithAIDownloader extends BoundingBoxDownloader {
|
|||
final var tile = TileXYZ.tileFromBBox(lon1, lat1, lon2, lat2);
|
||||
return getRequestForTile(tile);
|
||||
}
|
||||
return url.replace("{bbox}", Double.toString(lon1) + ',' + lat1 + ',' + lon2 + ',' + lat2)
|
||||
var current = url.replace("{bbox}", Double.toString(lon1) + ',' + lat1 + ',' + lon2 + ',' + lat2)
|
||||
.replace("{xmin}", Double.toString(lon1)).replace("{ymin}", Double.toString(lat1))
|
||||
.replace("{xmax}", Double.toString(lon2)).replace("{ymax}", Double.toString(lat2))
|
||||
+ (crop ? "&crop_bbox=" + DetectTaskingManagerUtils.getTaskingManagerBounds().toBBox().toStringCSV(",")
|
||||
: "")
|
||||
+ (this.info.getSourceType() == MapWithAIType.ESRI_FEATURE_SERVER && !this.info.isConflated()
|
||||
? "&resultOffset=" + this.start
|
||||
: "");
|
||||
.replace("{xmax}", Double.toString(lon2)).replace("{ymax}", Double.toString(lat2));
|
||||
boolean hasQuery = !Optional.ofNullable(URI.create(current).getRawQuery()).map(String::isEmpty).orElse(true);
|
||||
|
||||
if (crop) {
|
||||
current += (hasQuery ? '&' : '?') + "crop_bbox="
|
||||
+ DetectTaskingManagerUtils.getTaskingManagerBounds().toBBox().toStringCSV(",");
|
||||
hasQuery = true;
|
||||
}
|
||||
if (this.info.getSourceType() == MapWithAIType.ESRI_FEATURE_SERVER && !this.info.isConflated()) {
|
||||
current += (hasQuery ? '&' : '?') + "resultOffset=" + this.start;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
private String getRequestForTile(TileXYZ tile) {
|
||||
|
|
|
@ -213,8 +213,11 @@ public class MapWithAILayerInfo {
|
|||
if (this.finishListenerListenerList == null) {
|
||||
this.finishListenerListenerList = ListenerList.create();
|
||||
}
|
||||
boolean running = this.finishListenerListenerList.hasListeners();
|
||||
if (listener != null) {
|
||||
this.finishListenerListenerList.addListener(listener);
|
||||
}
|
||||
if (running) {
|
||||
return;
|
||||
}
|
||||
if (worker == null) {
|
||||
|
|
Ładowanie…
Reference in New Issue