Change default MapWith.AI URL

Completely remove facebook.com and replace with mapwith.ai

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-03-19 07:29:17 -06:00
rodzic cdd92d6edb
commit f5e43856b6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
24 zmienionych plików z 42 dodań i 42 usunięć

Wyświetl plik

@ -16,7 +16,7 @@ import org.openstreetmap.josm.spi.preferences.Config;
public final class MapWithAIPreferenceHelper {
/** This is the default MapWithAI URL */
public static final String DEFAULT_MAPWITHAI_API = "https://www.facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}";
public static final String DEFAULT_MAPWITHAI_API = "https://www.mapwith.ai/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}";
/**
* These are the default parameters for

Wyświetl plik

@ -160,7 +160,7 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
@Override
public String[] getUsageExamples() {
return new String[] { "/mapwithai", "/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059",
"/mapwithai?url=https://www.facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}",
"/mapwithai?url=https://www.mapwith.ai/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}",
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&max_obj=1",
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&switch_layer=false",
"/mapwithai?crop_bbox=-108.4625421,39.0621223,-108.4594728,39.0633059" };

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "7g3PXnF8/LGeSAoO/IVLk6j+58f9Nc65opZ9zOB6X5EcETKOxoNZNHWvVnAX+NOSLrAEniyckQSQEjy++0JEPA==",
"Date" : "Thu, 12 Dec 2019 19:52:23 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "04b70b03-d148-4e3d-a1fc-98334cd10e64",
"persistent" : true,
"insertionIndex" : 16
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "qE8O2lKCwh9FH8Ls+TyRrL0PM87qbcaZpFqnNwRft2Iby5lKiXh0YyNGocjYZR9bzNa+DdVLLvdsHqc/jEzI5g==",
"Date" : "Thu, 05 Dec 2019 14:38:35 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "146193dd-3082-495b-b350-8164e2858f8d",
"persistent" : true,
"insertionIndex" : 4
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "pAVoB1d1AQr2FejyueTMcu+w/Dz6gRkTSWM8vHG9Is5MwRmNnY97YHiWDtoDigLbkHsoKHQtAWaRwWI+47NZKw==",
"Date" : "Thu, 05 Dec 2019 14:25:09 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "2aac807a-9c8c-4713-a806-9f2451600f2b",
"persistent" : true,
"insertionIndex" : 3
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "bqxPaCd2/GK8PIU7Hr6DslDMp3/F+ll8B7EaeLa/XZbDGxLsb/lwY3xVffSu05Ei2vxRJYkyxOfFkCE8X6VM1A==",
"Date" : "Thu, 09 Jan 2020 22:32:03 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "33985fdf-cf15-493a-b928-ee3fdbcbfdf0",
"persistent" : true,
"insertionIndex" : 20
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "QOH/uVezGcDgTnRr2jZ1IkfdKKqM58LWaV/SlCdAL7YdKiWbBLck26+xgQpnTcAAWJ06oVbVNddoCu+fZ0F4Tg==",
"Date" : "Thu, 05 Dec 2019 14:46:51 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "4df1e72e-a62e-48b6-806d-99fd74956742",
"persistent" : true,
"insertionIndex" : 7
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "2LXW2XOFSud2jMIvNz4jS3H81zmh2tP9DZ72jEWc0CblovTw8d5N+nUb6TvA6ngvXNFgZvV1XU/aFRZFgbhQyQ==",
"Date" : "Thu, 05 Dec 2019 14:41:48 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "5260ecde-5bb6-4166-8d1b-d7f9545c23e2",
"persistent" : true,
"insertionIndex" : 5
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "rZgAVHsgMidbc1qG6uZ1HnY8AZong/MMSmxfqF5F2dIS13VTzs9pj0jHwSGPEXbrUdvC1JetW7YaojRdoZAtyg==",
"Date" : "Thu, 09 Jan 2020 22:32:05 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "53133862-d606-4976-b016-a35be71df3fb",
"persistent" : true,
"insertionIndex" : 24
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "PO3X3PMMLb3HV54QiTBVn22/bnfz0ZqWTjvT4wBDXxjrZCbSWSX8/uGfQ7ItzmBiQQJ0ytFBpHWmvZm48YWdUQ==",
"Date" : "Wed, 18 Dec 2019 20:28:03 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "5547df42-8d64-4a75-8a27-d598b4de5968",
"persistent" : true,
"insertionIndex" : 18
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "KVSWyv0yjs/bb9oG3tIz+ORdsb/MOp21ZqyqZ4PYVMtcBatm9nD9St1AD+4Y940a7kRKNpcGGjRzWAFf7D8Z2A==",
"Date" : "Tue, 17 Dec 2019 21:56:59 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "580f7b5b-cb9a-4092-8a39-bf8b714e6efe",
"persistent" : true,
"insertionIndex" : 17
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "dhIFF9YUe1yqRAhDmRDbaxjk4BPEDT4J+ZfS3f/9VXC26JEJCwj0UeBLgSLOSordqJQU1vgf/+UKp5GrfVsK4Q==",
"Date" : "Thu, 05 Dec 2019 14:41:48 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "5d411b92-09c4-42cf-a743-18ecd41d9aa7",
"persistent" : true,
"insertionIndex" : 6
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "uhd2nZW/X8sd5JhczSOjcv1ho6t3ZigTidNma/6Ufz5LENsI8a7coxvxs5h5lhF2507g9cfL1cQNL1JSP5Ugkg==",
"Date" : "Thu, 05 Dec 2019 14:25:07 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "715854d4-ba75-4289-89fe-9352c3d3ed6b",
"persistent" : true,
"insertionIndex" : 2
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "6SNk8LjeWecQ7fVDls1/ppOHNlT5InAzk8ncicPEJumxPVINolytqRf43uEWpzoZ7y/X6wV4BtosSAMjFHWhOQ==",
"Date" : "Thu, 09 Jan 2020 22:32:03 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "84a26ecb-1af0-462c-8564-18fa01fac8ab",
"persistent" : true,
"insertionIndex" : 23
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "0kS9nttkVneXlDeQlXCjt4E2i6EZWr/x567jhUZsqWfRXmQJn85lKhtbJkWycN+f1wqtSLt8eJhEDT8k7M6T8Q==",
"Date" : "Thu, 09 Jan 2020 22:32:02 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "87aff313-a8ee-4c4d-bd1b-1227560bc942",
"persistent" : true,
"insertionIndex" : 19
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "Ft0ll0W2ycTCP5jaTkDy14IHzuXnZCGmjpFirBchw4w+siZd7XPdwkkS/LSNfP8DTg8lrRe1eM4AjD5gVvRnGA==",
"Date" : "Thu, 09 Jan 2020 22:32:03 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "cd10fa4e-9002-4efd-a02d-f4ceaea1be5b",
"persistent" : true,
"insertionIndex" : 22
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "I/qwhIQ1HbCPP1b/G4YcbCF1wnO2HLJFEkEVXvObz6TvCU7pJfWpyQOxc/WjdtLOLgdINfvB3uS+BWNJrCUDqA==",
"Date" : "Thu, 09 Jan 2020 22:32:03 GMT",
"Alt-Svc" : "h3-24=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "d3f25407-315d-432c-a603-0a8703d3493e",
"persistent" : true,
"insertionIndex" : 21
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "FJjx+i5MkmXItFFBe8db1G1WdLXvQ6NIqBtGlXPCtsb0yb/h73gwbbNVdxakIqzOJbPDmFXbXJF3gBWact65eQ==",
"Date" : "Thu, 05 Dec 2019 14:36:42 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "e543fb8b-a680-4a1d-9f90-a793b7a7a6a6",
"persistent" : true,
"insertionIndex" : 3
}
}

Wyświetl plik

@ -15,7 +15,7 @@
"X-Content-Type-Options" : "nosniff",
"X-Frame-Options" : "DENY",
"X-XSS-Protection" : "0",
"Access-Control-Allow-Origin" : "https://facebook.com",
"Access-Control-Allow-Origin" : "https://mapwith.ai",
"X-FB-Debug" : "m/WYlrCA+2cHDhvA7061pLHfODxVTmN4SgoiNvdKamJPU9+zzs416odrc/I66jmQBlKAxE/iPZnIRxkHqaXDZQ==",
"Date" : "Tue, 26 Nov 2019 16:29:47 GMT",
"Alt-Svc" : "h3-23=\":443\"; ma=3600",
@ -25,4 +25,4 @@
"uuid" : "f2dfd4dc-13cf-4d10-9127-f884cb52acb4",
"persistent" : true,
"insertionIndex" : 20
}
}

Wyświetl plik

@ -57,7 +57,7 @@ public class GetDataRunnableTest {
}
public static String getDefaultMapWithAIAPIForTest(WireMockServer wireMock, String url) {
return getDefaultMapWithAIAPIForTest(wireMock, url, "https://www.facebook.com");
return getDefaultMapWithAIAPIForTest(wireMock, url, "https://www.mapwith.ai");
}
public static String getDefaultMapWithAIAPIForTest(WireMockServer wireMock, String url, String wireMockReplace) {

Wyświetl plik

@ -70,7 +70,7 @@ public class MapWithAIDataUtilsTest {
}
private String getDefaultMapWithAIAPIForTest(String url) {
return getDefaultMapWithAIAPIForTest(url, "https://www.facebook.com");
return getDefaultMapWithAIAPIForTest(url, "https://www.mapwith.ai");
}
private String getDefaultMapWithAIAPIForTest(String url, String wireMockReplace) {

Wyświetl plik

@ -64,7 +64,7 @@ public class MapWithAILayerTest {
wireMock.start();
MapWithAIPreferenceHelper.setMapWithAIURLs(MapWithAIPreferenceHelper.getMapWithAIURLs().stream().map(map -> {
map.put("url", map.getOrDefault("url", MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)
.replace("https://www.facebook.com", wireMock.baseUrl()));
.replace("https://www.mapwith.ai", wireMock.baseUrl()));
return map;
}).collect(Collectors.toList()));
layer = new MapWithAILayer(new DataSet(), "test", null);

Wyświetl plik

@ -54,7 +54,7 @@ public class MapWithAIRemoteControlTest {
wireMock.start();
MapWithAIPreferenceHelper.setMapWithAIURLs(MapWithAIPreferenceHelper.getMapWithAIURLs().stream().map(map -> {
map.put("url", map.getOrDefault("url", MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)
.replace("https://www.facebook.com", wireMock.baseUrl()));
.replace("https://www.mapwith.ai", wireMock.baseUrl()));
return map;
}).collect(Collectors.toList()));
}

Wyświetl plik

@ -47,7 +47,7 @@ public class MapWithAIDownloadReaderTest {
}
private String getDefaultMapWithAIAPIForTest(String url) {
return getDefaultMapWithAIAPIForTest(url, "https://www.facebook.com");
return getDefaultMapWithAIAPIForTest(url, "https://www.mapwith.ai");
}
private String getDefaultMapWithAIAPIForTest(String url, String wireMockReplace) {
@ -69,7 +69,7 @@ public class MapWithAIDownloadReaderTest {
MapWithAIDownloadReader reader = new MapWithAIDownloadReader();
// TODO revert commit that adds these lines as soon as MapWithAI fixes timeout
// issue see
// https://facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox=-108.4522247,39.0239848,-108.3368683,39.1066201&result_type=road_building_vector_xml
// https://mapwith.ai/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox=-108.4522247,39.0239848,-108.3368683,39.1066201&result_type=road_building_vector_xml
DownloadSettings settings = new DownloadSettings(new Bounds(39.095376, -108.4495519, 39.0987811, -108.4422314),
false, false);
MapWithAIDownloadReader.MapWithAIDownloadData data = new MapWithAIDownloadReader.MapWithAIDownloadData(