kopia lustrzana https://github.com/JOSM/MapWithAI
Dynamically produce source tags for Esri sources
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
ab03e83100
commit
45d424e885
|
@ -61,7 +61,7 @@ public class MapWithAILayerInfo {
|
|||
public static final String CONFIG_PREFIX = "mapwithai.sources.";
|
||||
|
||||
private static final String[] DEFAULT_LAYER_SITES = {
|
||||
"https://gitlab.com/gokaart/JOSM_MapWithAI/-/raw/pages/public/json/sources.json" };
|
||||
"https://gokaart.gitlab.io/JOSM_MapWithAI/json/sources.json" };
|
||||
|
||||
/** Unique instance -- MUST be after DEFAULT_LAYER_SITES */
|
||||
private static MapWithAILayerInfo instance;
|
||||
|
|
|
@ -152,6 +152,14 @@ public class ESRISourceReader implements Closeable {
|
|||
newInfo.setAttributionText(feature.getString("accessInformation"));
|
||||
}
|
||||
newInfo.setDescription(feature.getString("snippet"));
|
||||
if (newInfo.getSource() != null) {
|
||||
StringBuilder sourceTag = new StringBuilder(newInfo.getSource());
|
||||
if (!sourceTag.toString().endsWith("/")) {
|
||||
sourceTag.append('/');
|
||||
}
|
||||
sourceTag.append(feature.getString("name", newInfo.getId()));
|
||||
newInfo.setSource(sourceTag.toString());
|
||||
}
|
||||
return (newInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ public class MapWithAISourceReader implements Closeable {
|
|||
info.setConflationParameters(values.getJsonArray("conflationParameters"));
|
||||
info.setConflation(conflation);
|
||||
info.setConflationUrl(conflationUrl);
|
||||
info.setSource(values.getString("source", null));
|
||||
info.setAlreadyConflatedKey(alreadyConflatedKey);
|
||||
info.setCategory(MapWithAICategory.fromString(category));
|
||||
if (values.containsKey("conflation_ignore_categories")) {
|
||||
|
|
Ładowanie…
Reference in New Issue