kopia lustrzana https://github.com/JOSM/MapWithAI
Third party conflation: Add some better guards against conflation
Signed-off-by: Taylor Smock <tsmock@fb.com>pull/1/head
rodzic
516a508620
commit
8ec50cc5dc
|
@ -85,7 +85,7 @@ public class BoundingBoxMapWithAIDownloader extends BoundingBoxDownloader {
|
|||
synchronized (BoundingBoxMapWithAIDownloader.class) {
|
||||
externalData = super.parseOsm(progressMonitor);
|
||||
}
|
||||
if (!this.info.isConflated()
|
||||
if (MapWithAIInfo.THIRD_PARTY_CONFLATE.get() && !this.info.isConflated()
|
||||
&& !MapWithAIConflationCategory.conflationUrlFor(this.info.getCategory()).isEmpty()) {
|
||||
if (externalData.getDataSourceBounds().isEmpty()) {
|
||||
externalData.addDataSource(new DataSource(this.downloadArea, "External Data"));
|
||||
|
|
|
@ -25,9 +25,9 @@ import org.openstreetmap.josm.data.StructUtils.StructEntry;
|
|||
import org.openstreetmap.josm.data.imagery.ImageryInfo;
|
||||
import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryBounds;
|
||||
import org.openstreetmap.josm.data.imagery.Shape;
|
||||
import org.openstreetmap.josm.data.preferences.BooleanProperty;
|
||||
import org.openstreetmap.josm.data.sources.SourceInfo;
|
||||
import org.openstreetmap.josm.data.sources.SourcePreferenceEntry;
|
||||
import org.openstreetmap.josm.spi.preferences.Config;
|
||||
import org.openstreetmap.josm.tools.CheckParameterUtil;
|
||||
import org.openstreetmap.josm.tools.Logging;
|
||||
|
||||
|
@ -40,6 +40,8 @@ public class MapWithAIInfo extends
|
|||
private Map<String, String> replacementTags;
|
||||
private boolean conflate;
|
||||
private String conflationUrl;
|
||||
public static BooleanProperty THIRD_PARTY_CONFLATE = new BooleanProperty("mapwithai.third_party.conflate", true);
|
||||
|
||||
/**
|
||||
* The preferred source string for the source. This is added as a source tag on
|
||||
* the object _and_ is added to the changeset tags.
|
||||
|
@ -391,7 +393,7 @@ public class MapWithAIInfo extends
|
|||
|
||||
public String getUrlExpanded() {
|
||||
StringBuilder sb;
|
||||
if (conflate && Config.getPref().getBoolean("mapwithai.third_party.conflate", true)) {
|
||||
if (conflate && THIRD_PARTY_CONFLATE.get()) {
|
||||
sb = getConflationUrl();
|
||||
} else {
|
||||
sb = getNonConflatedUrl();
|
||||
|
|
Ładowanie…
Reference in New Issue