Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios,android] rename all occurrence of www.mapbox.com/feedback to app…
Browse files Browse the repository at this point in the history
…s.mapbox.com/feedback
  • Loading branch information
zugaldia authored and tobrun committed Jan 17, 2019
1 parent 8ef6a25 commit 3418970
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
@Config(constants = BuildConfig.class)
public class AttributionParseTest {

private static final String STREETS_ATTRIBUTION = "<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">&copy; Mapbox</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap</a> <a class=\"mapbox-improve-map\" href=\"https://www.mapbox.com/map-feedback/\" target=\"_blank\">Improve this map</a>\n";
private static final String SATELLITE_ATTRIBUTION = "<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">&copy; Mapbox</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap</a> <a class=\"mapbox-improve-map\" href=\"https://www.mapbox.com/map-feedback/\" target=\"_blank\">Improve this map</a> <a href=\"https://www.digitalglobe.com/\" target=\"_blank\">&copy; DigitalGlobe</a>\n";
private static final String STREETS_ATTRIBUTION = "<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">&copy; Mapbox</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap</a> <a class=\"mapbox-improve-map\" href=\"https://apps.mapbox.com/feedback/\" target=\"_blank\">Improve this map</a>\n";
private static final String SATELLITE_ATTRIBUTION = "<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">&copy; Mapbox</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap</a> <a class=\"mapbox-improve-map\" href=\"https://apps.mapbox.com/feedback/\" target=\"_blank\">Improve this map</a> <a href=\"https://www.digitalglobe.com/\" target=\"_blank\">&copy; DigitalGlobe</a>\n";

@Test
public void testParseAttributionStringSatellite() throws Exception {
Expand All @@ -39,7 +39,7 @@ public void testParseAttributionStringSatellite() throws Exception {
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:
Expand Down Expand Up @@ -72,7 +72,7 @@ public void testParseAttributionStringStreets() throws Exception {
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;
}
Expand All @@ -98,7 +98,7 @@ public void testParseAttributionWithoutMapbox() throws Exception {
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;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public void testParseAttributionArrayString() throws Exception {
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:
Expand Down Expand Up @@ -188,7 +188,7 @@ public void testParseHideCopyrightAttributionArrayString() throws Exception {
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:
Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/src/MGLAttributionInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ - (nullable NSURL *)feedbackURLForStyleURL:(nullable NSURL *)styleURL atCenterCo
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)];
Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/test/MGLAttributionInfoTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ - (void)testParsing {
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 {
Expand Down

0 comments on commit 3418970

Please sign in to comment.