kopia lustrzana https://github.com/JOSM/MapWithAI
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
rodzic
cdd92d6edb
commit
f5e43856b6
|
@ -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
|
||||
|
|
|
@ -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" };
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue