From 3418970ae45bfb8461ecfd2dfc9f58dd9e2758bc Mon Sep 17 00:00:00 2001 From: Antonio Zugaldia Date: Thu, 10 Jan 2019 10:08:05 -0500 Subject: [ios,android] rename all occurrence of www.mapbox.com/feedback to apps.mapbox.com/feedback --- .../java/com/mapbox/mapboxsdk/attribution/Attribution.java | 1 + .../mapbox/mapboxsdk/maps/AttributionDialogManager.java | 2 +- .../mapbox/mapboxsdk/attribution/AttributionParseTest.java | 14 +++++++------- platform/darwin/src/MGLAttributionInfo.mm | 2 +- platform/darwin/test/MGLAttributionInfoTests.m | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/attribution/Attribution.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/attribution/Attribution.java index e7ee5b6130..035614a90c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/attribution/Attribution.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/attribution/Attribution.java @@ -18,6 +18,7 @@ public class Attribution { // Using a List makes URL backwards compatible IMPROVE_MAP_URLS.add("https://www.mapbox.com/feedback/"); IMPROVE_MAP_URLS.add("https://www.mapbox.com/map-feedback/"); + IMPROVE_MAP_URLS.add("https://apps.mapbox.com/feedback/"); } private String title; diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java index 15ddfe644e..4f523948da 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java @@ -37,7 +37,7 @@ import java.util.Set; */ public class AttributionDialogManager implements View.OnClickListener, DialogInterface.OnClickListener { - private static final String MAP_FEEDBACK_URL = "https://www.mapbox.com/feedback"; + private static final String MAP_FEEDBACK_URL = "https://apps.mapbox.com/feedback"; private static final String MAP_FEEDBACK_LOCATION_FORMAT = MAP_FEEDBACK_URL + "/#/%f/%f/%d"; @NonNull diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/attribution/AttributionParseTest.java b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/attribution/AttributionParseTest.java index f20244aca9..cd58442e02 100644 --- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/attribution/AttributionParseTest.java +++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/attribution/AttributionParseTest.java @@ -15,8 +15,8 @@ import static junit.framework.Assert.assertEquals; @Config(constants = BuildConfig.class) public class AttributionParseTest { - private static final String STREETS_ATTRIBUTION = "© Mapbox © OpenStreetMap Improve this map\n"; - private static final String SATELLITE_ATTRIBUTION = "© Mapbox © OpenStreetMap Improve this map © DigitalGlobe\n"; + private static final String STREETS_ATTRIBUTION = "© Mapbox © OpenStreetMap Improve this map\n"; + private static final String SATELLITE_ATTRIBUTION = "© Mapbox © OpenStreetMap Improve this map © DigitalGlobe\n"; @Test public void testParseAttributionStringSatellite() throws Exception { @@ -39,7 +39,7 @@ public class AttributionParseTest { assertEquals("Title openstreetmap should match", "© OpenStreetMap", attribution.getTitle()); break; case 2: - assertEquals("URL improve map should match", "https://www.mapbox.com/map-feedback/", attribution.getUrl()); + assertEquals("URL improve map should match", "https://apps.mapbox.com/feedback/", attribution.getUrl()); assertEquals("Title improve map should match", "Improve This Map", attribution.getTitle()); break; case 3: @@ -72,7 +72,7 @@ public class AttributionParseTest { assertEquals("Title openstreetmap should match", "© OpenStreetMap", attribution.getTitle()); break; case 2: - assertEquals("URL improve map should match", "https://www.mapbox.com/map-feedback/", attribution.getUrl()); + assertEquals("URL improve map should match", "https://apps.mapbox.com/feedback/", attribution.getUrl()); assertEquals("Title improve map should match", "Improve This Map", attribution.getTitle()); break; } @@ -98,7 +98,7 @@ public class AttributionParseTest { assertEquals("Title openstreetmap should match", "© OpenStreetMap", attribution.getTitle()); break; case 1: - assertEquals("URL improve map should match", "https://www.mapbox.com/map-feedback/", attribution.getUrl()); + assertEquals("URL improve map should match", "https://apps.mapbox.com/feedback/", attribution.getUrl()); assertEquals("Title improve map should match", "Improve This Map", attribution.getTitle()); break; } @@ -126,7 +126,7 @@ public class AttributionParseTest { assertEquals("Title openstreetmap should match", "© OpenStreetMap", attribution.getTitle()); break; case 2: - assertEquals("URL improve map should match", "https://www.mapbox.com/map-feedback/", attribution.getUrl()); + assertEquals("URL improve map should match", "https://apps.mapbox.com/feedback/", attribution.getUrl()); assertEquals("Title improve map should match", "Improve This Map", attribution.getTitle()); break; case 3: @@ -188,7 +188,7 @@ public class AttributionParseTest { assertEquals("Title openstreetmap should match", "OpenStreetMap", attribution.getTitle()); break; case 2: - assertEquals("URL improve map should match", "https://www.mapbox.com/map-feedback/", attribution.getUrl()); + assertEquals("URL improve map should match", "https://apps.mapbox.com/feedback/", attribution.getUrl()); assertEquals("Title improve map should match", "Improve This Map", attribution.getTitle()); break; case 3: diff --git a/platform/darwin/src/MGLAttributionInfo.mm b/platform/darwin/src/MGLAttributionInfo.mm index 2d65a2e46e..17d159f660 100644 --- a/platform/darwin/src/MGLAttributionInfo.mm +++ b/platform/darwin/src/MGLAttributionInfo.mm @@ -161,7 +161,7 @@ return nil; } - NSURLComponents *components = [NSURLComponents componentsWithString:@"https://www.mapbox.com/feedback/"]; + NSURLComponents *components = [NSURLComponents componentsWithString:@"https://apps.mapbox.com/feedback/"]; components.fragment = [NSString stringWithFormat:@"/%.5f/%.5f/%.2f/%.1f/%i", centerCoordinate.longitude, centerCoordinate.latitude, zoomLevel, direction, (int)round(pitch)]; diff --git a/platform/darwin/test/MGLAttributionInfoTests.m b/platform/darwin/test/MGLAttributionInfoTests.m index b8fddd72ed..29d5024bd3 100644 --- a/platform/darwin/test/MGLAttributionInfoTests.m +++ b/platform/darwin/test/MGLAttributionInfoTests.m @@ -48,9 +48,9 @@ XCTAssertTrue(infos[3].feedbackLink); NSURL *styleURL = [MGLStyle satelliteStreetsStyleURLWithVersion:99]; XCTAssertEqualObjects([infos[3] feedbackURLAtCenterCoordinate:mapbox zoomLevel:14], - [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.Mapbox#/77.63680/12.98108/14.00/0.0/0"]); + [NSURL URLWithString:@"https://apps.mapbox.com/feedback/?referrer=com.mapbox.Mapbox#/77.63680/12.98108/14.00/0.0/0"]); XCTAssertEqualObjects([infos[3] feedbackURLForStyleURL:styleURL atCenterCoordinate:mapbox zoomLevel:3.14159 direction:90.9 pitch:12.5], - [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.Mapbox&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]); + [NSURL URLWithString:@"https://apps.mapbox.com/feedback/?referrer=com.mapbox.Mapbox&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]); } - (void)testStyle { -- cgit v1.2.1